mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-29 22:01:47 +02:00
- Enable typeAware option and no-explicit-any (error) in vite.config.ts - Ignore generated binding files from linting - Convert all 96 biome-ignore comments to oxlint-disable equivalents - Add suppression comments for 3 previously uncovered any usages Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
41 lines
1.1 KiB
TypeScript
41 lines
1.1 KiB
TypeScript
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 />;
|
|
}
|