diff --git a/client/src/App.tsx b/client/src/App.tsx index 73b26d15..adc8a92d 100644 --- a/client/src/App.tsx +++ b/client/src/App.tsx @@ -68,6 +68,7 @@ export default function App() { if (res.tile_server) { setStatic('tileServer', res.tile_server) } + setStatic('dangerous', res.dangerous || false) } else { router.navigate('/login') } diff --git a/client/src/assets/types.ts b/client/src/assets/types.ts index 1a8e3488..91e22262 100644 --- a/client/src/assets/types.ts +++ b/client/src/assets/types.ts @@ -53,6 +53,7 @@ export interface Config { tile_server: string scanner_type: string logged_in: boolean + dangerous: boolean } export interface Circle { diff --git a/client/src/components/dialogs/Manager.tsx b/client/src/components/dialogs/Manager.tsx index 0ba4c906..605bb545 100644 --- a/client/src/components/dialogs/Manager.tsx +++ b/client/src/components/dialogs/Manager.tsx @@ -4,7 +4,9 @@ import { Button, Dialog, DialogActions, DialogContent } from '@mui/material' import type { Feature, FeatureCollection } from 'geojson' import useDeepCompareEffect from 'use-deep-compare-effect' +import { useStatic } from '@hooks/useStatic' import { save } from '@services/fetches' + import DialogHeader from './Header' import { Code } from '../Code' @@ -73,7 +75,7 @@ export default function Manager({ open, setOpen, geojson }: Props) { Save to Koji