remove withMutations from cookies reducer, move utils/cookies to logic/cookies
This commit is contained in:
parent
d2a7ff94cb
commit
639b2b0a23
|
@ -11,7 +11,7 @@ import Button from '~/components/layout/Button'
|
|||
import { primary, mainFontFamily } from '~/theme/variables'
|
||||
import type { CookiesProps } from '~/logic/cookies/model/cookie'
|
||||
import { COOKIES_KEY } from '~/logic/cookies/model/cookie'
|
||||
import { loadFromCookie, saveCookie } from '~/utils/cookies'
|
||||
import { loadFromCookie, saveCookie } from '~/logic/cookies/utils'
|
||||
import { cookieBannerOpen } from '~/logic/cookies/store/selectors'
|
||||
import { openCookieBanner } from '~/logic/cookies/store/actions/openCookieBanner'
|
||||
|
||||
|
|
|
@ -13,11 +13,7 @@ export default handleActions<State, *>(
|
|||
[OPEN_COOKIE_BANNER]: (state: State, action: ActionType<Function>): State => {
|
||||
const { cookieBannerOpen } = action.payload
|
||||
|
||||
const newState = state.withMutations((map) => {
|
||||
map.set('cookieBannerOpen', cookieBannerOpen)
|
||||
})
|
||||
|
||||
return newState
|
||||
return state.set('cookieBannerOpen', cookieBannerOpen)
|
||||
},
|
||||
},
|
||||
Map(),
|
||||
|
|
Loading…
Reference in New Issue