mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-14 03:02:15 +01:00
Enable npm workspaces and update dependencies
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user