diff --git a/solid-watchparty/config.js b/solid-watchparty/config.js index 1088bb9..5eb67cc 100644 --- a/solid-watchparty/config.js +++ b/solid-watchparty/config.js @@ -1,4 +1,4 @@ export default { - baseDir: '/solid-watch-party/', + baseDir: '/solid-watch-party', outDir: '../dist', } diff --git a/solid-watchparty/src/components/SWPageWrapper.jsx b/solid-watchparty/src/components/SWPageWrapper.jsx index 1c2af52..2d562df 100644 --- a/solid-watchparty/src/components/SWPageWrapper.jsx +++ b/solid-watchparty/src/components/SWPageWrapper.jsx @@ -12,6 +12,9 @@ import SWLoadingIcon from './SWLoadingIcon'; /* util imports */ import { inSession } from '../utils/solidUtils'; +/* config imports */ +import config from '../../config'; + /* NOTE(Elias): className has influence on how the component between the Navbar and footer is styled. */ function SWPageWrapper({children, className, mustBeAuthenticated}) @@ -22,7 +25,7 @@ function SWPageWrapper({children, className, mustBeAuthenticated}) useEffect(() => { if (mustBeAuthenticated && !sessionRequestInProgress && !inSession(session)) { - navigateTo('/', {state: {from: currentLocation.pathname + currentLocation.search}}); + navigateTo(`${config.baseDir}/`, {state: {from: currentLocation.pathname + currentLocation.search}}); } }, [session, sessionRequestInProgress, currentLocation, navigateTo, mustBeAuthenticated]) diff --git a/solid-watchparty/vite.config.js b/solid-watchparty/vite.config.js index 69c8d6d..5cd0f43 100644 --- a/solid-watchparty/vite.config.js +++ b/solid-watchparty/vite.config.js @@ -5,7 +5,7 @@ import config from './config.js' // https://vitejs.dev/config/ export default defineConfig({ plugins: [react()], - base: config.baseDir, + base: `${config.baseDir}`, build: { outDir: config.outDir },