2022-08-24 20:18:42 +00:00
|
|
|
import React, { ComponentProps } from "react";
|
|
|
|
|
2022-12-22 12:35:01 +00:00
|
|
|
import { HorizontalTabs, Shell } from "@calcom/ui";
|
|
|
|
import { VerticalTabItemProps, HorizontalTabItemProps } from "@calcom/ui/v2";
|
|
|
|
|
|
|
|
import { FiltersContainer } from "../components/FiltersContainer";
|
2022-08-24 20:18:42 +00:00
|
|
|
|
2022-09-05 16:16:42 +00:00
|
|
|
const tabs: (VerticalTabItemProps | HorizontalTabItemProps)[] = [
|
2022-08-24 20:18:42 +00:00
|
|
|
{
|
|
|
|
name: "upcoming",
|
|
|
|
href: "/bookings/upcoming",
|
|
|
|
},
|
2022-09-22 07:48:27 +00:00
|
|
|
{
|
|
|
|
name: "unconfirmed",
|
|
|
|
href: "/bookings/unconfirmed",
|
|
|
|
},
|
2022-08-24 20:18:42 +00:00
|
|
|
{
|
2022-08-31 11:13:27 +00:00
|
|
|
name: "recurring",
|
|
|
|
href: "/bookings/recurring",
|
2022-08-24 20:18:42 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "past",
|
|
|
|
href: "/bookings/past",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "cancelled",
|
|
|
|
href: "/bookings/cancelled",
|
|
|
|
},
|
|
|
|
];
|
|
|
|
|
|
|
|
export default function BookingLayout({
|
|
|
|
children,
|
|
|
|
...rest
|
|
|
|
}: { children: React.ReactNode } & ComponentProps<typeof Shell>) {
|
|
|
|
return (
|
|
|
|
<Shell {...rest}>
|
2022-12-26 10:41:28 +00:00
|
|
|
<div className="flex max-w-6xl flex-col">
|
2022-12-22 12:35:01 +00:00
|
|
|
<div className="flex flex-col lg:flex-row">
|
2022-09-18 23:14:57 +00:00
|
|
|
<HorizontalTabs tabs={tabs} />
|
2022-12-22 12:35:01 +00:00
|
|
|
<FiltersContainer />
|
2022-08-24 20:18:42 +00:00
|
|
|
</div>
|
2022-09-09 15:02:31 +00:00
|
|
|
<main className="w-full max-w-6xl">{children}</main>
|
2022-08-24 20:18:42 +00:00
|
|
|
</div>
|
|
|
|
</Shell>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
export const getLayout = (page: React.ReactElement) => <BookingLayout>{page}</BookingLayout>;
|