feat: default view mode depends on location
parent
938ce130cd
commit
ec2c3b7de2
|
@ -13,8 +13,12 @@ import "./style/thumbs.css";
|
||||||
import "./style/row.css";
|
import "./style/row.css";
|
||||||
import "./photos";
|
import "./photos";
|
||||||
|
|
||||||
|
const defaultViewMode: ViewMode = location.href.includes("resistants")
|
||||||
|
? "photos"
|
||||||
|
: "map";
|
||||||
|
|
||||||
export const App = () => {
|
export const App = () => {
|
||||||
const [viewMode, setViewMode] = React.useState<ViewMode>("map");
|
const [viewMode, setViewMode] = React.useState<ViewMode>(defaultViewMode);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<DisplayModeContext.Provider
|
<DisplayModeContext.Provider
|
||||||
|
|
Loading…
Reference in New Issue