Skip to content

Commit

Permalink
try createMemoryHistory
Browse files Browse the repository at this point in the history
  • Loading branch information
ligsnf committed Dec 23, 2024
1 parent f738cf0 commit 18126fb
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/main.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
import { StrictMode } from 'react'
import ReactDOM from 'react-dom/client'
import './index.css'
import { RouterProvider, createRouter } from '@tanstack/react-router'
import { RouterProvider, createRouter, createMemoryHistory } from '@tanstack/react-router'
import { ThemeProvider } from "@/components/theme/theme-provider"

// Import the generated route tree
import { routeTree } from './routeTree.gen'

const memoryHistory = createMemoryHistory({
initialEntries: ['/monash-grades-calculator/'],
})

// Create a new router instance
const router = createRouter({
routeTree,
basepath: "/monash-grades-calculator/",
history: memoryHistory,
})

// Register the router instance for type safety
Expand Down

0 comments on commit 18126fb

Please sign in to comment.