File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,11 +7,13 @@ import LoginPage from './pages/LoginPage';
77import MenuPage from './pages/MenuPage' ;
88import WatchPage from './pages/WatchPage' ;
99
10+ /* config imports */
11+ import { BASEPATH } from './config'
1012
1113const router = createBrowserRouter ( [
12- { path : "/" , element : < LoginPage /> } ,
13- { path : "/menu" , element : < MenuPage /> } ,
14- { path : "/watch" , element : < WatchPage /> } ,
14+ { path : ( BASEPATH + "/" ) , element : < LoginPage /> } ,
15+ { path : ( BASEPATH + "/menu" ) , element : < MenuPage /> } ,
16+ { path : ( BASEPATH + "/watch" ) , element : < WatchPage /> } ,
1517] ) ;
1618
1719function App ( ) {
Original file line number Diff line number Diff line change 1+ export const BASEPATH = '/solid-watch-party'
12
23/* NOTE(Elias): default POD directory structure related to the watchparty */
34export const ROOMS_ROOT = 'watchparties/myRooms' ;
45export const MESSAGES_ROOT = 'watchparties/myMessages' ;
5-
Original file line number Diff line number Diff line change @@ -6,6 +6,9 @@ import { useLocation } from 'react-router-dom';
66import SWPageWrapper from '../components/SWPageWrapper'
77import SWLoginButton from '../components/SWLoginButton'
88
9+ /* config imports */
10+ import { BASEPATH } from '../config.js'
11+
912const authOptions = {
1013 clientName : "solid-watchparty" ,
1114} ;
@@ -14,7 +17,7 @@ export default function LoginPage()
1417{
1518 const [ oidcIssuer , setOidcIssuer ] = useState ( "http://localhost:3000/" ) ;
1619 const currentLocation = useLocation ( ) ;
17- const redirectLocation = ( currentLocation . state ?. from || " /menu" ) ;
20+ const redirectLocation = ( currentLocation . state ?. from || ` ${ BASEPATH } /menu` ) ;
1821 return (
1922 < SWPageWrapper className = "flex justify-center items-center" mustBeAuthenticated = { false } >
2023 < div className = "w-1/2" >
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import react from '@vitejs/plugin-react'
44// https://vitejs.dev/config/
55export default defineConfig ( {
66 plugins : [ react ( ) ] ,
7- base : '. /' ,
7+ base : '/solid-watch-party /' ,
88 build : {
99 outDir : '../dist'
1010 } ,
You can’t perform that action at this time.
0 commit comments