Skip to main content

apps/web/components/workspace-required.tsx

Metadata

Indexed Symbols

  • WorkspaceRequired (line 10, function) - Implements workspace required for module behavior.

Markdown Headings (if applicable)

No markdown headings detected.

Source Preview

import { Card } from "@anchor/ui";
import { WORKSPACE_QUERY_PARAM } from "../lib/workspace-context";

type WorkspaceRequiredProps = {
returnTo: string;
message?: string;
suggestions?: string[];
};

export function WorkspaceRequired({ returnTo, message, suggestions = [] }: WorkspaceRequiredProps) {
return (
<main className="mx-auto min-h-screen max-w-4xl px-6 py-14">
<Card tone="critical" className="space-y-4">
<p className="spec-label">Workspace Required</p>
<h1 className="text-3xl font-semibold text-[var(--ink-base)]">Select a Tenant Workspace</h1>
<p className="text-sm text-[var(--ink-muted)]">
{message ?? "This view requires an explicit workspace context. Production mode does not allow fallback workspace IDs."}
</p>
<form action={returnTo} method="GET" className="grid gap-3">
<label className="text-xs font-semibold uppercase tracking-[0.18em] text-[var(--ink-soft)]" htmlFor="workspace-id-input">
Workspace UUID
</label>
<input
id="workspace-id-input"
name={WORKSPACE_QUERY_PARAM}