import React from "react"
import Header from "./Header"
import Steps from "./Steps";
import toast, {Toaster} from "react-hot-toast";
export default function Layout({children, step, message_flash}) {
    React.useEffect(() => {
        if (message_flash)
        {
            toast(message_flash, {
                duration: 3000,
                style: {
                    backgroundColor: "#f89406"
                }
            });
        }
    }, [message_flash]);
    return (
        <main>
            <Toaster />
            <Header/>
            <section className={"container contents uploadart"}>
                <Steps step={step}/>
                {children}
            </section>
        </main>
    )
}
