diff --git a/src/components/dialogs/LogoDialog.tsx b/src/components/dialogs/LogoDialog.tsx index 33961a5..2924f07 100644 --- a/src/components/dialogs/LogoDialog.tsx +++ b/src/components/dialogs/LogoDialog.tsx @@ -3,7 +3,7 @@ import { LOGOS } from '$constants/logos'; import { Icon } from '$components/panels/Icon'; import classnames from 'classnames'; import { setLogo as setLogoAction } from "$redux/user/actions"; -import { IRootState } from "$redux/user/reducer"; +import { IRootState } from "$redux/user"; interface Props extends IRootState { setLogo: typeof setLogoAction, diff --git a/src/components/dialogs/MapListDialog.tsx b/src/components/dialogs/MapListDialog.tsx index 8e52106..fb6d94b 100644 --- a/src/components/dialogs/MapListDialog.tsx +++ b/src/components/dialogs/MapListDialog.tsx @@ -19,7 +19,7 @@ import * as Range from 'rc-slider/lib/Range'; import { TABS, TABS_TITLES } from '$constants/dialogs'; import { Icon } from '$components/panels/Icon'; import { pushPath } from '$utils/history'; -import { IRootState, IRouteListItem } from '$redux/user/reducer'; +import { IRootState, IRouteListItem } from '$redux/user'; import { ROLES } from "$constants/auth"; export interface IMapListDialogProps extends IRootState { diff --git a/src/components/dialogs/ProviderDialog.tsx b/src/components/dialogs/ProviderDialog.tsx index 61da606..79b1197 100644 --- a/src/components/dialogs/ProviderDialog.tsx +++ b/src/components/dialogs/ProviderDialog.tsx @@ -3,7 +3,7 @@ import { PROVIDERS, replaceProviderUrl } from '$constants/providers'; import { Icon } from '$components/panels/Icon'; import classnames from 'classnames'; import { changeProvider as changeProviderAction } from "$redux/user/actions"; -import { IRootState } from "$redux/user/reducer"; +import { IRootState } from "$redux/user"; interface Props extends IRootState { changeProvider: typeof changeProviderAction, diff --git a/src/components/dialogs/TitleDialog.tsx b/src/components/dialogs/TitleDialog.tsx index 9d40364..0f74e63 100644 --- a/src/components/dialogs/TitleDialog.tsx +++ b/src/components/dialogs/TitleDialog.tsx @@ -5,7 +5,7 @@ import { connect } from 'react-redux'; import classnames from 'classnames'; import { getStyle } from "$utils/dom"; import { nearestInt } from "$utils/geom"; -import { IRootState } from "$redux/user/reducer"; +import { IRootState } from "$redux/user"; import { parseDesc } from "$utils/format"; interface ITitleDialogProps { diff --git a/src/components/logo/LogoPreview.tsx b/src/components/logo/LogoPreview.tsx index 27f4123..923234a 100644 --- a/src/components/logo/LogoPreview.tsx +++ b/src/components/logo/LogoPreview.tsx @@ -1,7 +1,7 @@ import * as React from "react"; import { LOGOS } from "$constants/logos"; import { connect } from "react-redux"; -import { IRootState } from "$redux/user/reducer"; +import { IRootState } from "$redux/user"; interface Props extends IRootState {} diff --git a/src/components/panels/DistanceBar.tsx b/src/components/panels/DistanceBar.tsx index 9857f00..3360226 100644 --- a/src/components/panels/DistanceBar.tsx +++ b/src/components/panels/DistanceBar.tsx @@ -7,7 +7,7 @@ import { connect } from 'react-redux'; import * as Slider from 'rc-slider/lib/Slider'; import { bindActionCreators } from 'redux'; import { setSpeed } from '$redux/user/actions'; -import { IRootState } from "$redux/user/reducer"; +import { IRootState } from "$redux/user"; import { Tooltip } from "$components/panels/Tooltip"; import { isMobile } from "$utils/window"; diff --git a/src/components/panels/EditorDialog.tsx b/src/components/panels/EditorDialog.tsx index d4b2b45..af07059 100644 --- a/src/components/panels/EditorDialog.tsx +++ b/src/components/panels/EditorDialog.tsx @@ -28,7 +28,7 @@ import { } from '$redux/user/actions'; import { ProviderDialog } from '$components/dialogs/ProviderDialog'; import { ShotPrefetchDialog } from '$components/dialogs/ShotPrefetchDialog'; -import { IRootState } from "$redux/user/reducer"; +import { IRootState } from "$redux/user"; interface Props extends IRootState { width: number, diff --git a/src/components/panels/EditorPanel.tsx b/src/components/panels/EditorPanel.tsx index 5c3cb50..e310053 100644 --- a/src/components/panels/EditorPanel.tsx +++ b/src/components/panels/EditorPanel.tsx @@ -7,7 +7,7 @@ import { EditorDialog } from '$components/panels/EditorDialog'; import { bindActionCreators } from 'redux'; import { connect } from 'react-redux'; import { setMode, startEditing, stopEditing, setLogo, takeAShot, keyPressed } from '$redux/user/actions'; -import { IRootState } from "$redux/user/reducer"; +import { IRootState } from "$redux/user"; import { Tooltip } from "$components/panels/Tooltip"; interface Props extends IRootState { diff --git a/src/components/panels/TopRightPanel.tsx b/src/components/panels/TopRightPanel.tsx index f4f65d4..9b70fe8 100644 --- a/src/components/panels/TopRightPanel.tsx +++ b/src/components/panels/TopRightPanel.tsx @@ -6,7 +6,7 @@ import { LOGOS } from '$constants/logos'; import { setMode } from '$redux/user/actions'; import { connect } from 'react-redux'; import { MODES } from '$constants/modes'; -import { IRootState } from "$redux/user/reducer"; +import { IRootState } from "$redux/user"; import { Tooltip } from "$components/panels/Tooltip"; diff --git a/src/components/panels/UserPanel.tsx b/src/components/panels/UserPanel.tsx index e094fd1..4d497b7 100644 --- a/src/components/panels/UserPanel.tsx +++ b/src/components/panels/UserPanel.tsx @@ -21,7 +21,7 @@ import { Icon } from "$components/panels/Icon"; import classnames from "classnames"; import { CLIENT } from "$config/frontend"; import { DIALOGS, TABS } from "$constants/dialogs"; -import { IRootState } from "$redux/user/reducer"; +import { IRootState } from "$redux/user"; import { Tooltip } from "$components/panels/Tooltip"; import { TitleDialog } from "$components/dialogs/TitleDialog"; diff --git a/src/components/renderer/Renderer.tsx b/src/components/renderer/Renderer.tsx index 463593c..aa2d69d 100644 --- a/src/components/renderer/Renderer.tsx +++ b/src/components/renderer/Renderer.tsx @@ -7,7 +7,7 @@ import * as Croppr from 'croppr'; import 'croppr/dist/croppr.css'; import { LOGOS } from '$constants/logos'; import { RendererPanel } from '$components/panels/RendererPanel'; -import { IRootState } from "$redux/user/reducer"; +import { IRootState } from "$redux/user"; type Props = { data: IRootState['renderer']['data'], diff --git a/src/modules/Editor.ts b/src/modules/Editor.ts index b3c0e6a..50b9db3 100644 --- a/src/modules/Editor.ts +++ b/src/modules/Editor.ts @@ -24,7 +24,7 @@ import { } from '$redux/user/actions'; import { DEFAULT_PROVIDER, IProvider, PROVIDERS } from '$constants/providers'; import { STICKERS } from '$constants/stickers'; -import { IRootState } from "$redux/user/reducer"; +import { IRootState } from "$redux/user"; import { DEFAULT_USER, IUser } from "$constants/auth"; interface IEditor { diff --git a/src/modules/Sticker.tsx b/src/modules/Sticker.tsx index 4f0eec8..ea2bb2b 100644 --- a/src/modules/Sticker.tsx +++ b/src/modules/Sticker.tsx @@ -8,7 +8,7 @@ import { StickerDesc } from '$components/StickerDesc'; import classnames from 'classnames'; import { getLabelDirection } from '$utils/geom'; import { ILatLng } from "$modules/Stickers"; -import { IRootState } from "$redux/user/reducer"; +import { IRootState } from "$redux/user"; import { Editor, editor } from "$modules/Editor"; const getX = e => ( diff --git a/src/redux/map/index.ts b/src/redux/map/index.ts new file mode 100644 index 0000000..e69de29 diff --git a/src/redux/store.ts b/src/redux/store.ts index 1a5d11a..4687051 100644 --- a/src/redux/store.ts +++ b/src/redux/store.ts @@ -4,7 +4,7 @@ import { persistStore, persistReducer } from 'redux-persist'; import storage from 'redux-persist/lib/storage'; import createSagaMiddleware from 'redux-saga'; -import { userReducer, IRootReducer } from '$redux/user/reducer'; +import { userReducer, IRootReducer } from '$redux/user'; import { userSaga } from '$redux/user/sagas'; import { createBrowserHistory } from 'history'; import { locationChanged } from '$redux/user/actions'; diff --git a/src/redux/user/actions.ts b/src/redux/user/actions.ts index 5f43ab1..b06db61 100644 --- a/src/redux/user/actions.ts +++ b/src/redux/user/actions.ts @@ -1,6 +1,6 @@ import { ACTIONS } from '$redux/user/constants'; import { IUser } from "$constants/auth"; -import { IRootState } from "$redux/user/reducer"; +import { IRootState } from "$redux/user"; export const setUser = (user: IUser) => ({ type: ACTIONS.SET_USER, user }); export const userLogout = () => ({ type: ACTIONS.USER_LOGOUT }); diff --git a/src/redux/user/reducer.ts b/src/redux/user/index.ts similarity index 100% rename from src/redux/user/reducer.ts rename to src/redux/user/index.ts diff --git a/src/redux/user/sagas.ts b/src/redux/user/sagas.ts index d6bf860..43ee59d 100644 --- a/src/redux/user/sagas.ts +++ b/src/redux/user/sagas.ts @@ -85,7 +85,7 @@ import { DEFAULT_PROVIDER } from "$constants/providers"; import { DIALOGS, TABS } from "$constants/dialogs"; import * as ActionCreators from "$redux/user/actions"; -import { IRootState } from "$redux/user/reducer"; +import { IRootState } from "$redux/user"; import { downloadGPXTrack, getGPXString } from "$utils/gpx"; import { Unwrap } from "$utils/middleware"; import { IState } from "$redux/store"; diff --git a/src/utils/api.ts b/src/utils/api.ts index 7c08f02..9743aa0 100644 --- a/src/utils/api.ts +++ b/src/utils/api.ts @@ -1,6 +1,6 @@ import axios, { AxiosPromise } from "axios/index"; import { API } from "$constants/api"; -import { IRootState, IRouteListItem, IRoute } from "$redux/user/reducer"; +import { IRootState, IRouteListItem, IRoute } from "$redux/user"; import { IUser } from "$constants/auth"; import { ILatLng } from "$modules/Stickers"; import { IStickerDump } from "$modules/Sticker"; diff --git a/src/utils/renderer.ts b/src/utils/renderer.ts index 5cea0a7..58f7158 100644 --- a/src/utils/renderer.ts +++ b/src/utils/renderer.ts @@ -5,7 +5,7 @@ import { replaceProviderUrl } from '$constants/providers'; import { STICKERS } from '$constants/stickers'; import { ILatLng } from "$modules/Stickers"; import { IStickerDump } from "$modules/Sticker"; -import { IRootState } from "$redux/user/reducer"; +import { IRootState } from "$redux/user"; import { angleBetweenPoints, angleBetweenPointsRad, findDistancePx, middleCoordPx } from "$utils/geom"; import { Point } from "leaflet";