cal.pub0.org/components/BookingsShell.tsx

31 lines
589 B
TypeScript
Raw Normal View History

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