mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02:00
[feature] Application creation + management via API + settings panel (#3906)
* [feature] Application creation + management via API + settings panel * fix docs links * add errnorows test * use known application as shorter * add comment about side effects
This commit is contained in:
@@ -30,19 +30,19 @@ import {
|
||||
REGISTER,
|
||||
} from "redux-persist";
|
||||
|
||||
import { oauthSlice } from "./oauth";
|
||||
import { loginSlice } from "./login";
|
||||
import { gtsApi } from "../lib/query/gts-api";
|
||||
|
||||
const combinedReducers = combineReducers({
|
||||
[gtsApi.reducerPath]: gtsApi.reducer,
|
||||
oauth: oauthSlice.reducer,
|
||||
login: loginSlice.reducer,
|
||||
});
|
||||
|
||||
const persistedReducer = persistReducer({
|
||||
key: "gotosocial-settings",
|
||||
storage: require("redux-persist/lib/storage").default,
|
||||
stateReconciler: require("redux-persist/lib/stateReconciler/autoMergeLevel1").default,
|
||||
whitelist: ["oauth"],
|
||||
whitelist: ["login"],
|
||||
migrate: async (state) => {
|
||||
if (state == undefined) {
|
||||
return state;
|
||||
@@ -51,8 +51,8 @@ const persistedReducer = persistReducer({
|
||||
// This is a cheeky workaround for
|
||||
// redux-persist being a stickler.
|
||||
let anyState = state as any;
|
||||
if (anyState?.oauth != undefined) {
|
||||
anyState.oauth.expectingRedirect = false;
|
||||
if (anyState?.login != undefined) {
|
||||
anyState.login.expectingRedirect = false;
|
||||
}
|
||||
|
||||
return anyState;
|
||||
|
Reference in New Issue
Block a user