Delete send history for workspace

This commit is contained in:
Gregory Schier
2024-10-17 11:17:27 -07:00
parent d0b59a0fb4
commit c8342fb0a9
7 changed files with 103 additions and 33 deletions

View File

@@ -4,20 +4,17 @@ import { useDialog } from '../components/DialogContext';
import type { AlertProps } from './Alert';
import { Alert } from './Alert';
interface AlertArg {
id: string;
title: DialogProps['title'];
body: AlertProps['body'];
size?: DialogProps['size'];
}
export function useAlert() {
const dialog = useDialog();
return useCallback(
({
id,
title,
body,
size = 'sm',
}: {
id: string;
title: DialogProps['title'];
body: AlertProps['body'];
size?: DialogProps['size'];
}) =>
return useCallback<(a: AlertArg) => void>(
({ id, title, body, size = 'sm' }: AlertArg) =>
dialog.show({
id,
title,