2021-11-15 23:43:35 +01:00
|
|
|
import { ContextsV0 } from './v0'
|
2022-01-16 23:26:05 +01:00
|
|
|
import { ContextsV1 } from './v1'
|
2021-11-15 23:43:35 +01:00
|
|
|
|
|
|
|
const contextsMigration = {
|
|
|
|
1: (state: ContextsV0) => {
|
|
|
|
return (state = {
|
|
|
|
...state,
|
|
|
|
// @ts-ignore
|
|
|
|
mePage: {
|
|
|
|
lists: { shown: false },
|
|
|
|
announcements: { shown: false, unread: 0 }
|
|
|
|
}
|
|
|
|
})
|
2022-01-16 23:26:05 +01:00
|
|
|
},
|
|
|
|
2: (state: ContextsV1) => {
|
|
|
|
// @ts-ignore
|
|
|
|
delete state.mePage
|
|
|
|
return state
|
2021-11-15 23:43:35 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default contextsMigration
|