Add a dev menu item to show the home screen

This commit is contained in:
Gregory Schier
2026-09-15 14:27:11 -07:00
parent bcbf6d32a7
commit a8c845b091
4 changed files with 20 additions and 1 deletions
+10 -1
View File
@@ -1,10 +1,19 @@
import { createFileRoute } from "@tanstack/react-router";
import { Onboarding } from "../components/Onboarding";
import { RedirectToLatestWorkspace } from "../components/RedirectToLatestWorkspace";
type IndexSearchSchema = {
/** Show the home screen even when workspaces exist. Set by the dev menu. */
home?: true;
};
export const Route = createFileRoute("/")({
component: RouteComponent,
validateSearch: (search: Record<string, unknown>): IndexSearchSchema =>
search.home === true ? { home: true } : {},
});
function RouteComponent() {
return <RedirectToLatestWorkspace />;
const { home } = Route.useSearch();
return home ? <Onboarding /> : <RedirectToLatestWorkspace />;
}