mirror of
https://github.com/cosscom/coss.git
synced 2026-09-14 20:06:50 +08:00
f4ef088cae
* table wip * build reg * mc * build reg * wip * build reg * mc * mc * mc * mc * col sizing improvements * make the entire row clickable * mc * improvements * update card * improve table support * improve filtering system * mc * add calendar filter * mc * mc * fix ts errors * mc * split chip components * more splitting * mc * mc * mc * mc * rename table variant to card * color-mix hover/footer * update docs * fix * mc * improve table footer padding * restore popover * checkbox improvements * mc * fix input group * fix registry * mc * build registry
34 lines
734 B
TypeScript
34 lines
734 B
TypeScript
"use client";
|
|
|
|
import { CalendarIcon, LayoutListIcon } from "lucide-react";
|
|
import { usePathname } from "next/navigation";
|
|
import type * as React from "react";
|
|
import { TabbedNav } from "@/components/app/tabbed-nav";
|
|
|
|
function BookingsView({
|
|
className,
|
|
}: {
|
|
className?: string;
|
|
}): React.ReactElement {
|
|
const pathname = usePathname();
|
|
|
|
const viewTabs = [
|
|
{
|
|
icon: <LayoutListIcon className="size-4" />,
|
|
title: "List view",
|
|
url: pathname,
|
|
},
|
|
{
|
|
icon: <CalendarIcon className="size-4" />,
|
|
title: "Calendar view",
|
|
url: `${pathname}?view=calendar`,
|
|
},
|
|
];
|
|
|
|
return (
|
|
<TabbedNav ariaLabel="View type" className={className} tabs={viewTabs} />
|
|
);
|
|
}
|
|
|
|
export { BookingsView };
|