import { Link } from "react-router-dom"
import "./Layout.css"

export const Layout = ({ children }) => {
    return (
        <div className="layout">
            <header className="header">
                <h1 className="header__logo">Сервис</h1>
                <nav className="header__menu">
                    <a href="/">Список заказов</a>
                    <Link to='/add'>Добавить заказ</Link>
                    <a href="/login">Войти</a>
                </nav>
            </header>
            <main className="main-content">
                {children()}
            </main>
        </div>
    )
}