Choose workspace
Choosing a workspace in the sign-in card after signing in: the workspaces with the last used marked, invitations to accept or decline, and creating a new one.
Inset · No navigation. <AppShell direction="inset">, the default: the navigation on the grey app frame, the page a raised white card inside it, scrolling within.
npx wideset add block-choose-workspace
Import the default export from @/blocks/wideset/choose-workspace. The files below are relative to your project's source directory.
Installed with this block
action-tileavatarblock-stylesbuttontoastutils
blocks/wideset/choose-workspace/index.tsx
'use client';
import '@/styles/wideset-blocks.css';
import { ToastProvider } from '@/components/ui/wideset/toast/Toast.context';
import { AuthCard } from './auth-card';
import { ROUTES } from './data';
import { WorkspacePicker } from './workspace-picker';
/**
* Choose a workspace, Inset direction with no navigation: the sign-in card after signing in to an
* account in several workspaces, with the invitations waiting and creating a new one.
*/
export default function ChooseWorkspace() {
return (
<ToastProvider position="bottom-center">
<main className="ws-block-utility bg-ws-static-background p-ws-12 flex min-h-dvh items-center justify-center">
<AuthCard
other={{ href: ROUTES.signIn, label: 'Use another account' }}
className="w-full max-w-[38.75rem]"
>
<WorkspacePicker />
</AuthCard>
</main>
</ToastProvider>
);
}