Overview
TheClientProvider component is a client-side wrapper that provides toast notification functionality throughout the VisionaryAI application using react-hot-toast.
Location
Component signature
Props
Child components to be wrapped with the toast notification provider
Features
Toast notifications
- Provides global toast notification context via
react-hot-toast - Displays notifications at the bottom-center of the screen
- Used for success/error messages during image generation
Client-side rendering
- Marked with
"use client"directive for Next.js 13 App Router - Ensures toast functionality works in the client-side React context
Usage
The component is used in the root layout to wrap the entire application:Implementation details
Toast configuration
Position of toast notifications on the screen
Dependencies
react-hot-toast: Toast notification library
Related components
PromptInput
Uses toast notifications to display generation status
Header
Application header component