Extract admin dashboard from ghabilee-frontend2 into a dedicated Next.js app for backoffice.ghabilee.ir (no SEO indexing / Clarity).
18 lines
342 B
TypeScript
18 lines
342 B
TypeScript
'use client'
|
|
|
|
import { useContext } from 'react'
|
|
|
|
import { AlertModalContext } from '@/context/AlertModalContext'
|
|
|
|
const useAlertModal = () => {
|
|
const context = useContext(AlertModalContext)
|
|
|
|
if (!context) {
|
|
throw new Error('useAlertModal must be used within AlertModalProvider')
|
|
}
|
|
|
|
return context
|
|
}
|
|
|
|
export default useAlertModal
|