Files

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

11 lines
351 B
JavaScript
Raw Permalink Normal View History

2025-12-12 14:26:25 +09:00
import * as React from 'react';
import NotificationsContext from './NotificationsContext';
export default function useNotifications() {
const notificationsContext = React.useContext(NotificationsContext);
if (!notificationsContext) {
throw new Error('Notifications context was used without a provider.');
}
return notificationsContext;
}