mirror of
https://github.com/narrrl/holy-flavor-rater.git
synced 2026-11-04 17:07:01 +01:00
9 lines
270 B
TypeScript
9 lines
270 B
TypeScript
import { useContext } from 'react';
|
|
import { ConfirmContext } from '../contexts/ConfirmContext';
|
|
|
|
export const useConfirm = () => {
|
|
const ctx = useContext(ConfirmContext);
|
|
if (!ctx) throw new Error('useConfirm must be used within ConfirmProvider');
|
|
return ctx;
|
|
};
|