2022-08-24 20:18:42 +00:00
|
|
|
import React, { ComponentProps } from "react";
|
|
|
|
|
2023-01-10 15:39:29 +00:00
|
|
|
import Shell from "@calcom/features/shell/Shell";
|
|
|
|
import { HorizontalTabs } from "@calcom/ui";
|
2023-01-10 12:25:39 +00:00
|
|
|
import { VerticalTabItemProps, HorizontalTabItemProps } from "@calcom/ui";
|
2022-12-22 12:35:01 +00:00
|
|
|
|
|
|
|
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">
|
2023-02-03 16:49:33 +00:00
|
|
|
<div className="flex flex-col lg:flex-row">
|
2022-09-18 23:14:57 +00:00
|
|
|
<HorizontalTabs tabs={tabs} />
|
2023-01-07 10:00:11 +00:00
|
|
|
<div className="overflow-x-auto lg:ml-auto">
|
|
|
|
<FiltersContainer />
|
|
|
|
</div>
|
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>;
|