Skip to content
This repository was archived by the owner on Aug 11, 2025. It is now read-only.

Commit 9d189b4

Browse files
authored
Merge pull request #370 from hackforla/gh-pages-fix
history fix for gh-pages
2 parents 935f739 + 05418da commit 9d189b4

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

client/web/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "web",
33
"version": "0.1.0",
4-
"homepage": "https://hackforla.github.io/ballotnav",
4+
"homepage": "https://hackforla.github.io/ballotnav/",
55
"private": true,
66
"dependencies": {
77
"@fortawesome/fontawesome-svg-core": "^1.2.32",

client/web/src/App.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const useStyles = makeStyles({
2222
const App = () => {
2323
const classes = useStyles()
2424
return (
25-
<ConnectedRouter history={history}>
25+
<ConnectedRouter basename={process.env.PUBLIC_URL} history={history}>
2626
<Div100vh className={classes.root}>
2727
<Header />
2828
<div className={classes.content}>

client/web/src/services/history.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1-
import { createBrowserHistory } from 'history'
1+
import {
2+
// createBrowserHistory as createHistory, // for regular deploy
3+
createHashHistory as createHistory, // for gh-pages deploy
4+
} from 'history'
25

3-
const history = createBrowserHistory()
6+
const history = createHistory()
47

58
export default history

0 commit comments

Comments
 (0)