1
0
mirror of https://github.com/tooot-app/app synced 2025-06-05 22:19:13 +02:00

Move app startup check to App.tsx

This commit is contained in:
Zhiyuan Zheng
2020-12-22 00:10:55 +01:00
parent a1a959995e
commit 2bd9e6be2f
4 changed files with 50 additions and 17 deletions

View File

@ -82,7 +82,11 @@ const instancesSlice = createSlice({
url: 'm.cmx.im'
}
} as InstancesState,
reducers: {},
reducers: {
resetLocal: state => {
state.local = initialStateLocal
}
},
extraReducers: builder => {
builder.addCase(updateLocal.fulfilled, (state, action) => {
state.local = action.payload
@ -98,4 +102,6 @@ export const getLocalAccountId = (state: RootState) =>
export const getLocalAccountPreferences = (state: RootState) =>
state.instances.local.account.preferences
export const { resetLocal } = instancesSlice.actions
export default instancesSlice.reducer