| 'use client'; |
|
|
| import './globals.css'; |
| import Sidebar from '@/components/Sidebar'; |
| import { NexusAuthWrapper } from "@components/NexusAuth"; |
| import { ToastContainer, Flip } from 'react-toastify'; |
| import { CheckCircleIcon, InformationCircleIcon, ExclamationCircleIcon } from '@heroicons/react/20/solid'; |
|
|
| import { RelayAPIProvider } from '@components/RelayAPI'; |
|
|
| import { ToastProvider } from "@lib/ToastContext"; |
|
|
| export default function RootLayout({ children }) { |
| return ( |
| <html lang="en"> |
| <body> |
| <ToastProvider> |
| <ToastContainer |
| transition={Flip} |
| theme="dark" |
| icon={({ type, theme }) => { |
| switch (type) { |
| case 'info': |
| return <InformationCircleIcon className="text-indigo-400" />; |
| case 'error': |
| return <InformationCircleIcon className="text-red-500" />; |
| case 'success': |
| return <CheckCircleIcon className="h-5 w-5 text-green-500" />; |
| case 'warning': |
| return <ExclamationCircleIcon className="text-yellow-500" />; |
| default: |
| return null; |
| } |
| }} |
| /> |
| <NexusAuthWrapper> |
| <RelayAPIProvider> |
| <Sidebar /> |
| {children} |
| </RelayAPIProvider> |
| </NexusAuthWrapper> |
| </ToastProvider> |
| </body> |
| </html> |
| ); |
| } |