From 4bbb642b41c7deca8dbed0f622c18a0c8e54ba72 Mon Sep 17 00:00:00 2001 From: evlist Date: Wed, 14 Sep 2022 10:03:49 +0200 Subject: [PATCH] Cosmetic (reformat) --- src/App.tsx | 5 +---- src/components/map/map.tsx | 27 +++++++++++++-------------- src/store/map.ts | 4 +++- 3 files changed, 17 insertions(+), 19 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index 40a7310..7dfb0a4 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -30,10 +30,7 @@ setupIonicReact(); const App: React.FC = () => ( - - - - + ); diff --git a/src/components/map/map.tsx b/src/components/map/map.tsx index 91df6c2..695b127 100644 --- a/src/components/map/map.tsx +++ b/src/components/map/map.tsx @@ -8,20 +8,19 @@ import Slippy from '../slippy/slippy'; import TiledMap from './tiled-map'; const Map: react.FC<{}> = (props: {}) => { - const dispatch = useDispatch(); - - const resizeHandler = () => { - dispatch(mapActions.resize()); - }; - const debouncedResizeHandler = useMemo( - () => _.debounce(resizeHandler, 500), - [] - ); - - useEffect(() => { - window.addEventListener('resize', debouncedResizeHandler); - }, []); - + const dispatch = useDispatch(); + + const resizeHandler = () => { + dispatch(mapActions.resize()); + }; + const debouncedResizeHandler = useMemo( + () => _.debounce(resizeHandler, 500), + [] + ); + + useEffect(() => { + window.addEventListener('resize', debouncedResizeHandler); + }, []); return ( diff --git a/src/store/map.ts b/src/store/map.ts index b787f59..942abc3 100644 --- a/src/store/map.ts +++ b/src/store/map.ts @@ -105,7 +105,9 @@ const mapSlice = createSlice({ resize: (state) => { return computeStateFromScope(state.scope); }, - shift: (state, action) => {}, + shift: (state, action) => { + + }, scale: (state, action) => {}, }, });