Extract admin dashboard from ghabilee-frontend2 into a dedicated Next.js app for backoffice.ghabilee.ir (no SEO indexing / Clarity).
14 lines
409 B
TypeScript
14 lines
409 B
TypeScript
'use client'
|
|
|
|
import { ToastProvider } from '@heroui/react'
|
|
import { usePathname } from 'next/navigation'
|
|
|
|
import { isAdminOnlyRoute } from '@/lib/authRouting'
|
|
|
|
/** Keeps consumer toasts clear of bottom sheets while preserving the admin placement. */
|
|
export function AppToastProvider() {
|
|
const pathname = usePathname()
|
|
|
|
return <ToastProvider placement={isAdminOnlyRoute(pathname) ? 'bottom' : 'top'} />
|
|
}
|