File tree Expand file tree Collapse file tree 5 files changed +22
-3
lines changed
Expand file tree Collapse file tree 5 files changed +22
-3
lines changed Original file line number Diff line number Diff line change 1717 send_page_view : false
1818 } ) ;
1919 </ script >
20+
21+ < script >
22+ var path = window . location . pathname ;
23+ if ( ! path . startsWith ( "/#" ) && ! [ '/' , '' ] . includes ( path ) ) {
24+ window . location . replace ( `/#${ path } ` ) ;
25+ }
26+ </ script >
2027 </ head >
2128 < body >
2229 < div id ="root "> </ div >
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import { Route, Routes } from "react-router-dom";
22import { usePageTracking } from "./hooks/usePageTracking" ;
33import Home from "./pages/Home" ;
44import Team from "./pages/Team" ;
5+ import Sponsors from "./pages/Sponsors" ;
56
67function App ( ) {
78 usePageTracking ( ) ;
@@ -10,6 +11,7 @@ function App() {
1011 < Routes >
1112 < Route path = "/" element = { < Home /> } />
1213 < Route path = "/team" element = { < Team /> } />
14+ < Route path = "/sponsors" element = { < Sponsors /> } />
1315 </ Routes >
1416 ) ;
1517}
Original file line number Diff line number Diff line change 11import { StrictMode } from "react" ;
22import { createRoot } from "react-dom/client" ;
3- import { BrowserRouter } from "react-router-dom" ;
3+ import { HashRouter } from "react-router-dom" ;
44import "./index.css" ;
55import App from "./App.jsx" ;
66
7+ const baseUrl = ( import . meta. env . BASE_URL ?? "/" ) . replace ( / \/ $ / , "" ) || undefined ;
8+
79createRoot ( document . getElementById ( "root" ) ) . render (
810 < StrictMode >
9- < BrowserRouter >
11+ < HashRouter basename = { baseUrl } >
1012 < App />
11- </ BrowserRouter >
13+ </ HashRouter >
1214 </ StrictMode > ,
1315) ;
Original file line number Diff line number Diff line change 1+ const Sponsors = ( ) => {
2+ return (
3+ < div > Sponsors</ div >
4+ )
5+ }
6+
7+ export default Sponsors
Original file line number Diff line number Diff line change @@ -4,4 +4,5 @@ import { defineConfig } from "vite";
44// https://vite.dev/config/
55export default defineConfig ( {
66 plugins : [ react ( ) ] ,
7+ base : "/" ,
78} ) ;
You can’t perform that action at this time.
0 commit comments