- {props.children}
+
diff --git a/src/components/slippy/mouse-handler.tsx b/src/components/slippy/mouse-handler.tsx
index 3f320f3..1a10f29 100644
--- a/src/components/slippy/mouse-handler.tsx
+++ b/src/components/slippy/mouse-handler.tsx
@@ -1,5 +1,5 @@
-import react, { useCallback, useState } from 'react';
-import { useDispatch, useSelector } from 'react-redux';
+import react, { useState } from 'react';
+import { useDispatch } from 'react-redux';
import _ from 'lodash';
diff --git a/src/store/index.ts b/src/store/index.ts
index 68331ba..d13a2b7 100644
--- a/src/store/index.ts
+++ b/src/store/index.ts
@@ -1,9 +1,10 @@
import { configureStore } from '@reduxjs/toolkit';
import slippyReducer from './slippy';
+import mapReducer from './map';
const store = configureStore({
- reducer: { slippy: slippyReducer},
+ reducer: { slippy: slippyReducer, map: mapReducer },
});
export default store;
diff --git a/src/store/map.ts b/src/store/map.ts
new file mode 100644
index 0000000..bcf4a84
--- /dev/null
+++ b/src/store/map.ts
@@ -0,0 +1,30 @@
+import { createSlice } from '@reduxjs/toolkit';
+
+export interface MapState {
+ viewport: {
+ width: number;
+ height: number;
+ };
+}
+
+const initialMapState: MapState = {
+ viewport: {
+ width: window.innerWidth,
+ height: window.innerHeight,
+ },
+};
+
+const mapSlice = createSlice({
+ name: 'map',
+ initialState: initialMapState,
+ reducers: {
+ resize: (state) => {
+ state.viewport.height = window.innerHeight;
+ state.viewport.width = window.innerWidth;
+ },
+ },
+});
+
+export const mapActions = mapSlice.actions;
+
+export default mapSlice.reducer;
diff --git a/src/theme/slippy.css b/src/theme/slippy.css
index 8797080..50694f9 100644
--- a/src/theme/slippy.css
+++ b/src/theme/slippy.css
@@ -1,11 +1,9 @@
.slippy {
- position: fixed;
- width: 100%;
- height: 100%;
+ position: fixed;
+ width: 100%;
+ height: 100%;
}
-.background img {
- width: 4032px;
- height: 2268px;
- }
-
\ No newline at end of file
+.huge {
+ position: fixed;
+}