Skip to content

Commit

Permalink
🚑 hotfix routing error
Browse files Browse the repository at this point in the history
  • Loading branch information
eliasnijs committed Mar 5, 2024
1 parent 15d7587 commit 9f8bddf
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion solid-watchparty/config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export default {
baseDir: '/solid-watch-party/',
baseDir: '/solid-watch-party',
outDir: '../dist',
}
5 changes: 4 additions & 1 deletion solid-watchparty/src/components/SWPageWrapper.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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})
Expand All @@ -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])

Expand Down
2 changes: 1 addition & 1 deletion solid-watchparty/vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
},
Expand Down

0 comments on commit 9f8bddf

Please sign in to comment.