Skip to content

Commit b7e6c1e

Browse files
authored
Merge pull request #23 from SolidLabResearch/development-milestones
Add hotfixes to development-milestones to master also
2 parents 05e3a54 + fe4edfc commit b7e6c1e

4 files changed

Lines changed: 11 additions & 6 deletions

File tree

solid-watchparty/src/App.jsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,13 @@ import LoginPage from './pages/LoginPage';
77
import MenuPage from './pages/MenuPage';
88
import WatchPage from './pages/WatchPage';
99

10+
/* config imports */
11+
import { BASEPATH } from './config'
1012

1113
const 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

1719
function App() {

solid-watchparty/src/config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1+
export const BASEPATH = '/solid-watch-party'
12

23
/* NOTE(Elias): default POD directory structure related to the watchparty */
34
export const ROOMS_ROOT = 'watchparties/myRooms';
45
export const MESSAGES_ROOT = 'watchparties/myMessages';
5-

solid-watchparty/src/pages/LoginPage.jsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ import { useLocation } from 'react-router-dom';
66
import SWPageWrapper from '../components/SWPageWrapper'
77
import SWLoginButton from '../components/SWLoginButton'
88

9+
/* config imports */
10+
import { BASEPATH } from '../config.js'
11+
912
const 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">

solid-watchparty/vite.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import react from '@vitejs/plugin-react'
44
// https://vitejs.dev/config/
55
export default defineConfig({
66
plugins: [react()],
7-
base: './',
7+
base: '/solid-watch-party/',
88
build: {
99
outDir: '../dist'
1010
},

0 commit comments

Comments
 (0)