diff --git a/src/components/CookiesBanner/index.jsx b/src/components/CookiesBanner/index.jsx index 6c76a3cc..f55229d6 100644 --- a/src/components/CookiesBanner/index.jsx +++ b/src/components/CookiesBanner/index.jsx @@ -10,7 +10,8 @@ import { WELCOME_ADDRESS } from '~/routes/routes' import Button from '~/components/layout/Button' import { primary, mainFontFamily } from '~/theme/variables' import { loadFromStorage, saveToStorage } from '~/utils/storage' -import { COOKIES_KEY } from '~/logic/cookies/utils/cookiesStorage' +import type { CookiesProps } from '~/logic/cookies/model/cookie' +import { COOKIES_KEY } from '~/logic/cookies/model/cookie' const useStyles = makeStyles({ container: { @@ -66,11 +67,6 @@ const useStyles = makeStyles({ }, }) -export type CookiesProps = { - acceptedNecessary: boolean, - acceptedAnalytics: boolean, -} - const CookiesBanner = () => { const classes = useStyles() diff --git a/src/index.js b/src/index.js index 92373cbc..2640e722 100644 --- a/src/index.js +++ b/src/index.js @@ -4,7 +4,6 @@ import React from 'react' import ReactDOM from 'react-dom' import Root from '~/components/Root' import loadActiveTokens from '~/logic/tokens/store/actions/loadActiveTokens' -import loadCookiesFromStorage from '~/logic/cookies/store/actions/loadCookiesFromStorage' import loadDefaultSafe from '~/routes/safe/store/actions/loadDefaultSafe' import loadSafesFromStorage from '~/routes/safe/store/actions/loadSafesFromStorage' import { store } from '~/store' @@ -19,7 +18,6 @@ if (process.env.NODE_ENV !== 'production') { store.dispatch(loadActiveTokens()) store.dispatch(loadSafesFromStorage()) store.dispatch(loadDefaultSafe()) -store.dispatch(loadCookiesFromStorage()) const root = document.getElementById('root') diff --git a/src/logic/cookies/model/cookie.js b/src/logic/cookies/model/cookie.js new file mode 100644 index 00000000..23007489 --- /dev/null +++ b/src/logic/cookies/model/cookie.js @@ -0,0 +1,11 @@ +// @flow +import type { RecordOf } from 'immutable' + +export const COOKIES_KEY = 'COOKIES' + +export type CookiesProps = { + acceptedNecessary: boolean, + acceptedAnalytics: boolean, +} + +export type Cookie = RecordOf diff --git a/src/store/index.js b/src/store/index.js index 00e743f6..deeff088 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -19,7 +19,6 @@ import notifications, { type NotificationReducerState as NotificationsState, } from '~/logic/notifications/store/reducer/notifications' -import cookies, { COOKIE_REDUCER_ID, CookieReducerState as CookiesState } from '../logic/cookies/store/reducer/cookies' export const history = createBrowserHistory() @@ -35,7 +34,6 @@ export type GlobalState = { tokens: TokensState, transactions: TransactionsState, notifications: NotificationsState, - cookies: CookiesState, } export type GetState = () => GlobalState @@ -47,7 +45,6 @@ const reducers: Reducer = combineReducers({ [TOKEN_REDUCER_ID]: tokens, [TRANSACTIONS_REDUCER_ID]: transactions, [NOTIFICATIONS_REDUCER_ID]: notifications, - [COOKIE_REDUCER_ID]: cookies, }) export const store: Store = createStore(reducers, finalCreateStore)