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