Enable npm workspaces and update dependencies

This commit is contained in:
Gregor Vostrak
2026-02-02 03:19:22 +01:00
parent 72662727c5
commit 1597b5490a
31 changed files with 2502 additions and 7953 deletions

View File

@@ -264,17 +264,17 @@ function prefetchProjectMembers(queryClient: QueryClient, projectId: string) {
*/
function findPrefetcher(url: string): ((queryClient: QueryClient) => void) | undefined {
// Extract pathname from URL
const pathname = url.startsWith('http') ? new URL(url).pathname : url.split('?')[0];
const pathname = url.startsWith('http') ? new URL(url).pathname : url.split('?')[0]!;
// Try exact match first
if (routePrefetchers[pathname]) {
if (pathname && routePrefetchers[pathname]) {
return routePrefetchers[pathname];
}
// Try pattern matching for dynamic routes like /projects/{id}
const projectMatch = pathname.match(/^\/projects\/([^/]+)$/);
const projectMatch = pathname?.match(/^\/projects\/([^/]+)$/);
if (projectMatch) {
const projectId = projectMatch[1];
const projectId = projectMatch[1]!;
return (queryClient) => {
prefetchProjects(queryClient);
prefetchTasks(queryClient);