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

Commit 027095d

Browse files
authored
Fix URLs redirect to root. (#440)
* Fix URLs redirect to root. * Not just path * Only use window when available to support prerendering. * Fix window check
1 parent 28d4a01 commit 027095d

File tree

6 files changed

+9
-6
lines changed

6 files changed

+9
-6
lines changed

cafe-map/client/web/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
}
1313
},
1414
"dependencies": {
15-
"@curiostack/base-web": "0.0.44",
15+
"@curiostack/base-web": "0.0.48",
1616
"@curiostack/cafemap-api": "1.0.0",
1717
"@material-ui/core": "4.2.1",
1818
"@material-ui/icons": "4.2.1",

common/web/base-web/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
"@storybook/addon-options": "5.1.9",
5050
"@storybook/addon-viewport": "5.1.9",
5151
"@storybook/react": "5.1.9",
52+
"@types/enzyme": "3.10.3",
5253
"@types/history": "4.7.2",
5354
"@types/intl": "1.2.0",
5455
"@types/jest": "24.0.15",
@@ -137,7 +138,6 @@
137138
"devDependencies": {
138139
"@types/compression-webpack-plugin": "2.0.1",
139140
"@types/copy-webpack-plugin": "5.0.0",
140-
"@types/enzyme": "3.10.3",
141141
"@types/enzyme-adapter-react-16": "1.0.5",
142142
"@types/eslint": "4.16.6",
143143
"@types/fontfaceobserver": "0.0.6",

common/web/base-web/src/state/reducers.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@ import { InjectableStore } from './store';
3333
export interface RouterStateRecord extends Record<RouterState>, RouterState {}
3434

3535
export const routeInitialState: RouterStateRecord = Record<RouterState>({
36-
location: createLocation(''),
36+
location: createLocation(
37+
typeof window !== 'undefined' ? window.location : '',
38+
),
3739
action: 'POP',
3840
})();
3941

eggworld/client/web/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
}
1818
},
1919
"dependencies": {
20-
"@curiostack/base-web": "0.0.44",
20+
"@curiostack/base-web": "0.0.48",
2121
"@curiostack/eggworld-api": "1.0.0",
2222
"howler": "2.1.2",
2323
"konva": "3.3.2",

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"@babel/runtime-corejs2": "7.5.5",
1717
"@babel/runtime-corejs3": "7.5.5",
1818
"@curiostack/base-node-dev": "0.0.16",
19-
"@curiostack/base-web": "0.0.47",
19+
"@curiostack/base-web": "0.0.48",
2020
"@curiostack/eslint-config-web": "0.0.2",
2121
"@gfx/zopfli": "1.0.14",
2222
"@hugmanrique/react-markdown-loader": "0.0.2",

yarn.lock

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -886,7 +886,7 @@
886886
typescript "3.5.3"
887887

888888
"@curiostack/base-web@0.0.44":
889-
version "0.0.47"
889+
version "0.0.48"
890890
dependencies:
891891
"@babel/core" "7.5.5"
892892
"@babel/plugin-proposal-async-generator-functions" "7.2.0"
@@ -912,6 +912,7 @@
912912
"@storybook/addon-options" "5.1.9"
913913
"@storybook/addon-viewport" "5.1.9"
914914
"@storybook/react" "5.1.9"
915+
"@types/enzyme" "3.10.3"
915916
"@types/history" "4.7.2"
916917
"@types/intl" "1.2.0"
917918
"@types/jest" "24.0.15"

0 commit comments

Comments
 (0)