snapshot of https://github.com/mountain-loop/yaak.git (main, 2026-09-23; blobs > 131072B omitted)
Some checks failed
Lint and Test / Lint/Test (push) Has been cancelled
Generate Sponsors README / deploy (push) Has been skipped

This commit is contained in:
upstream-mirror
2026-09-23 17:39:41 +05:00
commit 906fb231cc
1544 changed files with 164131 additions and 0 deletions

View File

@@ -0,0 +1,40 @@
import { createFileRoute } from "@tanstack/react-router";
import { Workspace } from "../../../components/Workspace";
type WorkspaceSearchSchema = {
environment_id?: string | null;
cookie_jar_id?: string | null;
} & (
| {
request_id: string;
}
| {
folder_id: string;
}
// oxlint-disable-next-line no-restricted-types -- Needed to support empty
| {}
);
export const Route = createFileRoute("/workspaces/$workspaceId/")({
component: RouteComponent,
validateSearch: (search: Record<string, unknown>): WorkspaceSearchSchema => {
const base: Pick<WorkspaceSearchSchema, "environment_id" | "cookie_jar_id"> = {
environment_id: search.environment_id as string,
cookie_jar_id: search.cookie_jar_id as string,
};
const requestId = search.request_id as string | undefined;
const folderId = search.folder_id as string | undefined;
if (requestId != null) {
return { ...base, request_id: requestId };
}
if (folderId) {
return { ...base, folder_id: folderId };
}
return base;
},
});
function RouteComponent() {
return <Workspace />;
}