Skip to content

Database diagrams editor that allows you to visualize and design your DB with a single query.

468 B
Raw Blame
import { createContext, useContext } from 'react';
import { emptyFn } from '@/lib/utils';
import type { BaseAlertDialogProps } from '@/dialogs/base-alert-dialog/base-alert-dialog';

export interface AlertContext {
    showAlert: (params: BaseAlertDialogProps) => void;
    closeAlert: () => void;
}

export const alertContext = createContext<AlertContext>({
    closeAlert: emptyFn,
    showAlert: emptyFn,
});

export const useAlert = () => useContext(alertContext);