import { Suspense } from "react";
import { Link } from "react-router";
import { Outlet } from "react-router";

export default function Layout() {
  return (
    <>
      <ul>
        <li>
          <Link to="/orders">Pagamentos</Link>
          <Link to="/users">Usuários</Link>
          <Link to="/enrollments">Matrículas</Link>
        </li>
      </ul>

      <Suspense fallback={<div>Loading...</div>}>
        <Outlet />
      </Suspense>
    </>
  );
}
