{children || (
)}
import Link from "next/link"; import { useRouter } from "next/router"; import Head from "next/head"; import ky from "ky/umd"; import { useState } from "react"; import config from "../../src/config"; export default function Layout({ title, children }) { const [menuOpen, openMenu] = useState(false); const [avatarDropdownOpen, openAvatarDropdown] = useState(false); const router = useRouter(); const handleSignOut = async (e) => { e.preventDefault(); try { await ky.post("/logout"); window.location = `${config.kratos.browser}/self-service/browser/flows/logout`; } catch (error) { console.log(error); // todo: handle errors with a message } }; return (