You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
session-desktop/ts/state/onboarding/ducks/modals.ts

29 lines
858 B
TypeScript

import { PayloadAction, createSlice } from '@reduxjs/toolkit';
import { TermsOfServicePrivacyDialogProps } from '../../../components/dialog/TermsOfServicePrivacyDialog';
export type TermsOfServicePrivacyModalState = TermsOfServicePrivacyDialogProps | null;
export type ModalsState = {
termsOfServicePrivacyModalState: TermsOfServicePrivacyModalState | null;
};
const initialState: ModalsState = {
termsOfServicePrivacyModalState: null,
};
export const modalsSlice = createSlice({
name: 'modals',
initialState,
reducers: {
updateTermsOfServicePrivacyModal(
state,
action: PayloadAction<TermsOfServicePrivacyModalState>
) {
return { ...state, termsOfServicePrivacyModalState: action.payload };
},
},
});
export const { updateTermsOfServicePrivacyModal } = modalsSlice.actions;
export default modalsSlice.reducer;