Fix cookieStore deletion
This commit is contained in:
parent
36251352f9
commit
26b420742d
|
@ -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()
|
||||
|
||||
|
|
|
@ -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')
|
||||
|
||||
|
|
|
@ -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<CookiesProps>
|
|
@ -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<GlobalState> = combineReducers({
|
|||
[TOKEN_REDUCER_ID]: tokens,
|
||||
[TRANSACTIONS_REDUCER_ID]: transactions,
|
||||
[NOTIFICATIONS_REDUCER_ID]: notifications,
|
||||
[COOKIE_REDUCER_ID]: cookies,
|
||||
})
|
||||
|
||||
export const store: Store<GlobalState> = createStore(reducers, finalCreateStore)
|
||||
|
|
Loading…
Reference in New Issue