Collection share modal cleanup (#38030)

This commit is contained in:
diondiondion authored and GitHub committed 2026-03-02 16:19:13 +00:00
1 parent ceaadc791e
commit 03b2f77ad2
7 files changed
+39 -35

No files matched your search

@@ -3,7 +3,11 @@ import { useCallback } from 'react';
import { FormattedMessage } from 'react-intl';
import { Button } from 'mastodon/components/button';
import { ModalShell } from 'mastodon/components/modal_shell';
import {
ModalShell,
ModalShellActions,
ModalShellBody,
} from 'mastodon/components/modal_shell';
export interface BaseConfirmationModalProps {
onClose: () => void;
@@ -58,14 +62,14 @@ export const ConfirmationModal: React.FC<
return (
<ModalShell>
<ModalShell.Body>
<ModalShellBody>
<h1 id={titleId}>{title}</h1>
{message && <p>{message}</p>}
{extraContent ?? children}
</ModalShell.Body>
</ModalShellBody>
<ModalShell.Actions>
<ModalShellActions>
<button onClick={onClose} className='link-button' type='button'>
{cancel ?? (
<FormattedMessage
@@ -99,7 +103,7 @@ export const ConfirmationModal: React.FC<
{confirm}
</Button>
{/* eslint-enable */}
</ModalShell.Actions>
</ModalShellActions>
</ModalShell>
);
};
@@ -11,7 +11,6 @@ import {
DomainBlockModal,
ReportModal,
ReportCollectionModal,
ShareCollectionModal,
EmbedModal,
ListAdder,
CompareHistoryModal,
@@ -80,7 +79,7 @@ export const MODAL_COMPONENTS = {
'DOMAIN_BLOCK': DomainBlockModal,
'REPORT': ReportModal,
'REPORT_COLLECTION': ReportCollectionModal,
'SHARE_COLLECTION': ShareCollectionModal,
'SHARE_COLLECTION': () => import('@/mastodon/features/collections/detail/share_modal').then(module => ({ default: module.CollectionShareModal })),
'ACTIONS': () => Promise.resolve({ default: ActionsModal }),
'EMBED': EmbedModal,
'FOCAL_POINT': () => Promise.resolve({ default: AltTextModal }),
@@ -62,12 +62,6 @@ export function CollectionsEditor() {
);
}
export function ShareCollectionModal() {
return import('../../collections/detail/share_modal').then(
module => ({default: module.CollectionShareModal})
);
}
export function Status () {
return import('../../status');
}