2021-09-30 19:59:34 +00:00
|
|
|
import React from "react";
|
|
|
|
|
2021-10-15 10:53:42 +00:00
|
|
|
import { useLocale } from "@lib/hooks/useLocale";
|
|
|
|
|
2021-09-29 21:33:18 +00:00
|
|
|
import NavTabs from "./NavTabs";
|
|
|
|
|
2021-09-30 19:59:34 +00:00
|
|
|
export default function BookingsShell({ children }: { children: React.ReactNode }) {
|
2021-10-15 10:53:42 +00:00
|
|
|
const { t } = useLocale();
|
2021-09-29 21:33:18 +00:00
|
|
|
const tabs = [
|
|
|
|
{
|
2021-10-15 10:53:42 +00:00
|
|
|
name: t("upcoming"),
|
2021-09-29 21:33:18 +00:00
|
|
|
href: "/bookings/upcoming",
|
|
|
|
},
|
|
|
|
{
|
2021-10-15 10:53:42 +00:00
|
|
|
name: t("past"),
|
2021-09-29 21:33:18 +00:00
|
|
|
href: "/bookings/past",
|
|
|
|
},
|
|
|
|
{
|
2021-10-15 10:53:42 +00:00
|
|
|
name: t("cancelled"),
|
2021-09-29 21:33:18 +00:00
|
|
|
href: "/bookings/cancelled",
|
|
|
|
},
|
|
|
|
];
|
|
|
|
|
|
|
|
return (
|
2021-09-30 19:59:34 +00:00
|
|
|
<>
|
|
|
|
<NavTabs tabs={tabs} linkProps={{ shallow: true }} />
|
|
|
|
<main>{children}</main>
|
|
|
|
</>
|
2021-09-29 21:33:18 +00:00
|
|
|
);
|
|
|
|
}
|