Skip to content

Commit ea0d4b9

Browse files
authored
feat(route): Test routing (allthatjazzleo#3)
1 parent d723a40 commit ea0d4b9

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

frontend/src/lib/utils.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ export function cn(...inputs: ClassValue[]) {
77

88
export function isLoveApp() {
99
// 💖-> %F0%9F%92%96
10-
return window.location.pathname.includes('%F0%9F%92%96');
10+
return window.location.pathname.includes('/love/%F0%9F%92%96');
1111
}

frontend/src/tanstack.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
11
import { QueryClient } from '@tanstack/react-query';
2-
import { createRouter } from '@tanstack/react-router';
2+
import { createMemoryHistory, createRouter } from '@tanstack/react-router';
33

44
import { routeTree } from './routeTree.gen';
55

66
// Create a new router instance
77

88
const queryClient = new QueryClient();
99

10+
const memoryHistory = createMemoryHistory({
11+
initialEntries: ['/proposal-manager/'],
12+
});
13+
1014
const router = createRouter({
1115
routeTree,
16+
history: memoryHistory,
1217
context: {
1318
queryClient,
1419
},

0 commit comments

Comments
 (0)