Skip to content

Commit

Permalink
Conditional hash routing
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremiah-carlson committed Sep 8, 2023
1 parent 29779b6 commit c6fa8b3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .github/workflows/deploy-gh-pages.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: deploy-gh-pages
on: workflow_dispatch

env:
HASH_ROUTING: true

jobs:
# Build job
build:
Expand Down
4 changes: 3 additions & 1 deletion www/src/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@ if (import.meta.env.DEV && !(root instanceof HTMLElement)) {
);
}

const routerSrc = (import.meta.env['HASH_ROUTING'] == true)? hashIntegration() : null;

render(() => (
<Router source={hashIntegration()}>
<Router source={routerSrc}>
<Routes>
<Route path="/" component={Default} />
<Route path="/concert/" component={Concert} />
Expand Down

0 comments on commit c6fa8b3

Please sign in to comment.