import React, { useState, useEffect } from 'react'; import ApplicationLogo from '@/Components/ApplicationLogo'; import Dropdown from '@/Components/Dropdown'; import { ToastContainer, toast } from 'react-toastify' import ResponsiveNavLink from '@/Components/ResponsiveNavLink'; import { Link } from '@inertiajs/inertia-react'; import MenuItem from '@/Components/SidebarMenuItem'; export default function Authenticated({ auth, children, flash }) { const [showingNavigationDropdown, setShowingNavigationDropdown] = useState(false); useEffect(() => { if (flash.message !== null) { toast(flash.message.message, {type: flash.message.type}) } }, [flash]) return (