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

61 lines
1.1 KiB
TypeScript
Raw Normal View History

import React, { ComponentProps } from "react";
2022-07-27 02:24:00 +00:00
import { Icon } from "@calcom/ui/Icon";
import ErrorBoundary from "@lib/ErrorBoundary";
2021-10-13 09:34:55 +00:00
2022-05-17 20:43:27 +00:00
import NavTabs from "./NavTabs";
import Shell from "./Shell";
const tabs = [
{
name: "profile",
href: "/settings/profile",
2022-07-27 02:24:00 +00:00
icon: Icon.User,
},
{
name: "teams",
href: "/settings/teams",
2022-07-27 02:24:00 +00:00
icon: Icon.Users,
},
{
name: "security",
href: "/settings/security",
2022-07-27 02:24:00 +00:00
icon: Icon.Key,
},
{
name: "developer",
href: "/settings/developer",
2022-07-27 02:24:00 +00:00
icon: Icon.Terminal,
},
{
name: "billing",
href: "/settings/billing",
2022-07-27 02:24:00 +00:00
icon: Icon.CreditCard,
},
{
name: "admin",
href: "/settings/admin",
2022-07-27 02:24:00 +00:00
icon: Icon.Lock,
adminRequired: true,
},
];
export default function SettingsShell({
children,
...rest
}: { children: React.ReactNode } & ComponentProps<typeof Shell>) {
return (
<Shell {...rest}>
<div className="sm:mx-auto">
<NavTabs tabs={tabs} />
</div>
<main className="max-w-4xl">
<>
<ErrorBoundary>{children}</ErrorBoundary>
</>
</main>
</Shell>
);
}