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 Button from '~/components/layout/Button'
|
||||||
import { primary, mainFontFamily } from '~/theme/variables'
|
import { primary, mainFontFamily } from '~/theme/variables'
|
||||||
import { loadFromStorage, saveToStorage } from '~/utils/storage'
|
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({
|
const useStyles = makeStyles({
|
||||||
container: {
|
container: {
|
||||||
|
@ -66,11 +67,6 @@ const useStyles = makeStyles({
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
export type CookiesProps = {
|
|
||||||
acceptedNecessary: boolean,
|
|
||||||
acceptedAnalytics: boolean,
|
|
||||||
}
|
|
||||||
|
|
||||||
const CookiesBanner = () => {
|
const CookiesBanner = () => {
|
||||||
const classes = useStyles()
|
const classes = useStyles()
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,6 @@ import React from 'react'
|
||||||
import ReactDOM from 'react-dom'
|
import ReactDOM from 'react-dom'
|
||||||
import Root from '~/components/Root'
|
import Root from '~/components/Root'
|
||||||
import loadActiveTokens from '~/logic/tokens/store/actions/loadActiveTokens'
|
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 loadDefaultSafe from '~/routes/safe/store/actions/loadDefaultSafe'
|
||||||
import loadSafesFromStorage from '~/routes/safe/store/actions/loadSafesFromStorage'
|
import loadSafesFromStorage from '~/routes/safe/store/actions/loadSafesFromStorage'
|
||||||
import { store } from '~/store'
|
import { store } from '~/store'
|
||||||
|
@ -19,7 +18,6 @@ if (process.env.NODE_ENV !== 'production') {
|
||||||
store.dispatch(loadActiveTokens())
|
store.dispatch(loadActiveTokens())
|
||||||
store.dispatch(loadSafesFromStorage())
|
store.dispatch(loadSafesFromStorage())
|
||||||
store.dispatch(loadDefaultSafe())
|
store.dispatch(loadDefaultSafe())
|
||||||
store.dispatch(loadCookiesFromStorage())
|
|
||||||
|
|
||||||
const root = document.getElementById('root')
|
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,
|
type NotificationReducerState as NotificationsState,
|
||||||
} from '~/logic/notifications/store/reducer/notifications'
|
} from '~/logic/notifications/store/reducer/notifications'
|
||||||
|
|
||||||
import cookies, { COOKIE_REDUCER_ID, CookieReducerState as CookiesState } from '../logic/cookies/store/reducer/cookies'
|
|
||||||
|
|
||||||
export const history = createBrowserHistory()
|
export const history = createBrowserHistory()
|
||||||
|
|
||||||
|
@ -35,7 +34,6 @@ export type GlobalState = {
|
||||||
tokens: TokensState,
|
tokens: TokensState,
|
||||||
transactions: TransactionsState,
|
transactions: TransactionsState,
|
||||||
notifications: NotificationsState,
|
notifications: NotificationsState,
|
||||||
cookies: CookiesState,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export type GetState = () => GlobalState
|
export type GetState = () => GlobalState
|
||||||
|
@ -47,7 +45,6 @@ const reducers: Reducer<GlobalState> = combineReducers({
|
||||||
[TOKEN_REDUCER_ID]: tokens,
|
[TOKEN_REDUCER_ID]: tokens,
|
||||||
[TRANSACTIONS_REDUCER_ID]: transactions,
|
[TRANSACTIONS_REDUCER_ID]: transactions,
|
||||||
[NOTIFICATIONS_REDUCER_ID]: notifications,
|
[NOTIFICATIONS_REDUCER_ID]: notifications,
|
||||||
[COOKIE_REDUCER_ID]: cookies,
|
|
||||||
})
|
})
|
||||||
|
|
||||||
export const store: Store<GlobalState> = createStore(reducers, finalCreateStore)
|
export const store: Store<GlobalState> = createStore(reducers, finalCreateStore)
|
||||||
|
|
Loading…
Reference in New Issue