Improve modals reducer types (#26610)

This commit is contained in:
Renaud Chaput authored and GitHub committed 2023-09-22 16:41:50 +02:00
1 parent 39da3d86f8
commit b93ffb74bb
2 files changed
+24 -33

No files matched your search

+3 -1
View File
@@ -1,12 +1,14 @@
import { createAction } from '@reduxjs/toolkit';
import type { ModalProps } from 'mastodon/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');