cal.pub0.org/apps/web/components/BookingsShell.tsx

35 lines
665 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",
},
{
name: t("recurring"),
href: "/bookings/recurring",
},
{
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>
</>
);
}