mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-22 09:29:16 +01:00
Switch to BiomeJS (#306)
This commit is contained in:
@@ -11,7 +11,7 @@ type WorkspaceSearchSchema = {
|
||||
| {
|
||||
folder_id: string;
|
||||
}
|
||||
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
||||
// biome-ignore lint/complexity/noBannedTypes: Needed to support empty
|
||||
| {}
|
||||
);
|
||||
|
||||
@@ -27,11 +27,11 @@ export const Route = createFileRoute('/workspaces/$workspaceId/')({
|
||||
const folderId = search.folder_id as string | undefined;
|
||||
if (requestId != null) {
|
||||
return { ...base, request_id: requestId };
|
||||
} else if (folderId) {
|
||||
return { ...base, folder_id: folderId };
|
||||
} else {
|
||||
return base;
|
||||
}
|
||||
if (folderId) {
|
||||
return { ...base, folder_id: folderId };
|
||||
}
|
||||
return base;
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
@@ -1,25 +1,23 @@
|
||||
import { createFileRoute, Navigate, useParams } from '@tanstack/react-router'
|
||||
import { createFileRoute, Navigate, useParams } from '@tanstack/react-router';
|
||||
|
||||
// -----------------------------------------------------------------------------------
|
||||
// IMPORTANT: This is a deprecated route. Since the active request is optional, it was
|
||||
// moved from a path param to a query parameter. This route does a redirect to the
|
||||
// parent, while preserving the active request.
|
||||
|
||||
export const Route = createFileRoute(
|
||||
'/workspaces/$workspaceId/requests/$requestId',
|
||||
)({
|
||||
export const Route = createFileRoute('/workspaces/$workspaceId/requests/$requestId')({
|
||||
component: RouteComponent,
|
||||
})
|
||||
});
|
||||
|
||||
function RouteComponent() {
|
||||
const { workspaceId, requestId } = useParams({
|
||||
from: '/workspaces/$workspaceId/requests/$requestId',
|
||||
})
|
||||
});
|
||||
return (
|
||||
<Navigate
|
||||
to="/workspaces/$workspaceId"
|
||||
params={{ workspaceId }}
|
||||
search={(prev) => ({ ...prev, requestId })}
|
||||
/>
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { createFileRoute } from '@tanstack/react-router'
|
||||
import { RedirectToLatestWorkspace } from '../../components/RedirectToLatestWorkspace'
|
||||
import { createFileRoute } from '@tanstack/react-router';
|
||||
import { RedirectToLatestWorkspace } from '../../components/RedirectToLatestWorkspace';
|
||||
|
||||
export const Route = createFileRoute('/workspaces/')({
|
||||
component: RouteComponent,
|
||||
})
|
||||
});
|
||||
|
||||
function RouteComponent() {
|
||||
return <RedirectToLatestWorkspace />
|
||||
return <RedirectToLatestWorkspace />;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user