mirror of
https://github.com/nowcommunity/nowdatabase.git
synced 2026-10-12 19:13:52 +03:00
10 lines
366 B
TypeScript
Executable File
10 lines
366 B
TypeScript
Executable File
import { NotificationContext } from '@/components/Notification'
|
|
import { useContext } from 'react'
|
|
|
|
export const useNotify = () => {
|
|
const { notify, setMessage } = useContext(NotificationContext)
|
|
// setMessage can be used to change a notification's message without creating a new one
|
|
// use this to create a progress bar etc.
|
|
return { notify, setMessage }
|
|
}
|