[Glitch] Improve modals reducer types

Port b93ffb74bb to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
Renaud Chaput
2023-09-22 16:41:50 +02:00
committed by Claire
parent abdb58840a
commit b2d67fbe33
2 changed files with 24 additions and 33 deletions

View File

@@ -1,12 +1,14 @@
import { createAction } from '@reduxjs/toolkit';
import type { ModalProps } from 'flavours/glitch/reducers/modal';
import type { MODAL_COMPONENTS } from '../features/ui/components/modal_root';
export type ModalType = keyof typeof MODAL_COMPONENTS;
interface OpenModalPayload {
modalType: ModalType;
modalProps: unknown;
modalProps: ModalProps;
}
export const openModal = createAction<OpenModalPayload>('MODAL_OPEN');