Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions apps/web/src/routes/__root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { scopedProjectKey, scopeProjectRef } from "@t3tools/client-runtime/envir
import { squashAtomCommandFailure } from "@t3tools/client-runtime/state/runtime";
import {
Outlet,
Link,
redirect,
createRootRoute,
type ErrorComponentProps,
Expand Down Expand Up @@ -104,11 +105,27 @@ export const Route = createRootRoute({
},
component: RootRouteView,
errorComponent: RootRouteErrorView,
notFoundComponent: RootRouteNotFoundView,
head: () => ({
meta: [{ name: "title", content: APP_DISPLAY_NAME }],
}),
});

function RootRouteNotFoundView() {
return (
<main className="flex min-h-0 min-w-0 flex-1 items-center justify-center p-6">
<div className="flex max-w-sm flex-col items-center gap-4 text-center">
<h1 className="text-lg font-medium text-foreground">Page not found</h1>
<p className="text-sm text-muted-foreground">
This link doesn't point to a page in {APP_DISPLAY_NAME}. Go home to choose a project or
start a thread.
</p>
<Button render={<Link to="/" replace />}>Go home</Button>
</div>
</main>
);
}

function RootRouteView() {
useEffect(() => installDesktopPasteAsText(window.desktopBridge, window), []);
const pathname = useLocation({ select: (location) => location.pathname });
Expand Down
Loading