Skip to content

Commit 9f8bddf

Browse files
committed
🚑 hotfix routing error
1 parent 15d7587 commit 9f8bddf

3 files changed

Lines changed: 6 additions & 3 deletions

File tree

solid-watchparty/config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
export default {
2-
baseDir: '/solid-watch-party/',
2+
baseDir: '/solid-watch-party',
33
outDir: '../dist',
44
}

solid-watchparty/src/components/SWPageWrapper.jsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ import SWLoadingIcon from './SWLoadingIcon';
1212
/* util imports */
1313
import { inSession } from '../utils/solidUtils';
1414

15+
/* config imports */
16+
import config from '../../config';
17+
1518

1619
/* NOTE(Elias): className has influence on how the component between the Navbar and footer is styled. */
1720
function SWPageWrapper({children, className, mustBeAuthenticated})
@@ -22,7 +25,7 @@ function SWPageWrapper({children, className, mustBeAuthenticated})
2225

2326
useEffect(() => {
2427
if (mustBeAuthenticated && !sessionRequestInProgress && !inSession(session)) {
25-
navigateTo('/', {state: {from: currentLocation.pathname + currentLocation.search}});
28+
navigateTo(`${config.baseDir}/`, {state: {from: currentLocation.pathname + currentLocation.search}});
2629
}
2730
}, [session, sessionRequestInProgress, currentLocation, navigateTo, mustBeAuthenticated])
2831

solid-watchparty/vite.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import config from './config.js'
55
// https://vitejs.dev/config/
66
export default defineConfig({
77
plugins: [react()],
8-
base: config.baseDir,
8+
base: `${config.baseDir}`,
99
build: {
1010
outDir: config.outDir
1111
},

0 commit comments

Comments
 (0)