Skip to content

Commit 6c1de83

Browse files
committed
add refresh fallback and fix routing errors
1 parent d33f543 commit 6c1de83

3 files changed

Lines changed: 4 additions & 7 deletions

File tree

main.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ jobs:
2525
run: |
2626
yarn i
2727
yarn run build
28+
- name: Add 404 fallback for SPA 🔁
29+
run: cp dist/index.html dist/404.html
2830
- name: Deploy 🚀
2931
uses: JamesIves/github-pages-deploy-action@releases/v4
3032
with:

src/components/Styling/TheHeader.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ export default {
144144
const authStore = useAuthStore();
145145
authStore.clearAuth();
146146
this.notloggedOut = await logOut();
147-
window.location.href = '/';
147+
window.location.href = 'https://knowledgeonwebscale.github.io/solid-cockpit/';
148148
},
149149
homepageRedir(): void {
150150
redirectToHomepage();

src/router.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import { useAuthStore } from "./stores/auth";
1515
* The router here allows for navigation between different functional pages of the TRIPLE App
1616
*/
1717
const router = createRouter({
18-
history: createWebHistory('/solid-cockpit/'),
18+
history: createWebHistory(import.meta.env.BASE_URL),
1919
routes: [
2020
{
2121
name: "Home",
@@ -47,11 +47,6 @@ const router = createRouter({
4747
path: "/privacy",
4848
components: { default: EditPrivacy },
4949
},
50-
{
51-
name: "CatchAll",
52-
path: '/:notFound(.*)',
53-
components: NotFound,
54-
}
5550
],
5651
});
5752

0 commit comments

Comments
 (0)