Skip to content

Commit 8bd3fb0

Browse files
actions-userclaude
andcommitted
feat: add ToastProvider and wire react-toastify globally in root layout
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 026ce25 commit 8bd3fb0

2 files changed

Lines changed: 25 additions & 0 deletions

File tree

src/app/layout.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import type { Metadata } from 'next'
22
import '@/assets/css/globals.css'
3+
import 'react-toastify/dist/ReactToastify.css'
34
import Header from '@/components/layout/header'
45
import { geistMono, geistSans, Raleway } from './fonts'
56
import 'animate.css/animate.min.css'
@@ -11,6 +12,7 @@ import Footer from '../components/layout/footer'
1112
import ErrorBoundary from '@/components/ErrorBoundary'
1213
import GlobalErrorHandler from '@/components/GlobalErrorHandler'
1314
import { CliOverlay } from '@/components/cli-overlay'
15+
import { ToastProvider } from '@/components/providers/toast-provider'
1416

1517
export const metadata: Metadata = {
1618
title: 'CodeBuilder, Inc. - Software Engineering Solutions.',
@@ -81,6 +83,7 @@ export default function RootLayout({
8183
*/}
8284
<GlobalErrorHandler />
8385
<CliOverlay />
86+
<ToastProvider />
8487
<div className="flex flex-col min-h-screen">
8588
<Header />
8689
<div className="relative flex-1 overflow-x-hidden">
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
'use client'
2+
3+
import { ToastContainer } from 'react-toastify'
4+
5+
export function ToastProvider() {
6+
return (
7+
<ToastContainer
8+
position="top-right"
9+
autoClose={4200}
10+
newestOnTop
11+
closeOnClick
12+
pauseOnHover
13+
draggable={false}
14+
theme="light"
15+
toastStyle={{
16+
borderRadius: '14px',
17+
border: '1px solid rgba(9, 175, 223, 0.14)',
18+
boxShadow: '0 18px 36px rgba(15, 23, 42, 0.12)',
19+
}}
20+
/>
21+
)
22+
}

0 commit comments

Comments
 (0)