2023-02-16 22:39:57 +00:00
|
|
|
import type { ComponentProps } from "react";
|
|
|
|
import React from "react";
|
2021-09-29 21:33:18 +00:00
|
|
|
|
2023-01-10 15:39:29 +00:00
|
|
|
import Shell from "@calcom/features/shell/Shell";
|
2023-01-23 23:08:01 +00:00
|
|
|
import { ErrorBoundary } from "@calcom/ui";
|
2023-04-12 15:26:31 +00:00
|
|
|
import { CreditCard, Key, Lock, Terminal, User, Users } from "@calcom/ui/components/icon";
|
2021-10-13 09:34:55 +00:00
|
|
|
|
2022-05-17 20:43:27 +00:00
|
|
|
import NavTabs from "./NavTabs";
|
2021-09-29 21:33:18 +00:00
|
|
|
|
2022-05-26 17:07:14 +00:00
|
|
|
const tabs = [
|
|
|
|
{
|
|
|
|
name: "profile",
|
2023-02-24 18:39:09 +00:00
|
|
|
href: "/settings/my-account/profile",
|
2023-04-12 15:26:31 +00:00
|
|
|
icon: User,
|
2022-05-26 17:07:14 +00:00
|
|
|
},
|
2022-06-01 17:24:41 +00:00
|
|
|
{
|
|
|
|
name: "teams",
|
|
|
|
href: "/settings/teams",
|
2023-04-12 15:26:31 +00:00
|
|
|
icon: Users,
|
2022-06-01 17:24:41 +00:00
|
|
|
},
|
2022-05-26 17:07:14 +00:00
|
|
|
{
|
|
|
|
name: "security",
|
|
|
|
href: "/settings/security",
|
2023-04-12 15:26:31 +00:00
|
|
|
icon: Key,
|
2022-05-26 17:07:14 +00:00
|
|
|
},
|
|
|
|
{
|
2022-06-01 17:24:41 +00:00
|
|
|
name: "developer",
|
|
|
|
href: "/settings/developer",
|
2023-04-12 15:26:31 +00:00
|
|
|
icon: Terminal,
|
2022-05-26 17:07:14 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "billing",
|
|
|
|
href: "/settings/billing",
|
2023-04-12 15:26:31 +00:00
|
|
|
icon: CreditCard,
|
2022-05-26 17:07:14 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "admin",
|
|
|
|
href: "/settings/admin",
|
2023-04-12 15:26:31 +00:00
|
|
|
icon: Lock,
|
2022-05-26 17:07:14 +00:00
|
|
|
adminRequired: true,
|
|
|
|
},
|
|
|
|
];
|
2021-09-29 21:33:18 +00:00
|
|
|
|
2022-05-26 17:07:14 +00:00
|
|
|
export default function SettingsShell({
|
|
|
|
children,
|
|
|
|
...rest
|
|
|
|
}: { children: React.ReactNode } & ComponentProps<typeof Shell>) {
|
2021-09-29 21:33:18 +00:00
|
|
|
return (
|
2022-05-26 17:07:14 +00:00
|
|
|
<Shell {...rest}>
|
2021-09-29 21:33:18 +00:00
|
|
|
<div className="sm:mx-auto">
|
|
|
|
<NavTabs tabs={tabs} />
|
|
|
|
</div>
|
2022-05-26 17:07:14 +00:00
|
|
|
<main className="max-w-4xl">
|
|
|
|
<>
|
|
|
|
<ErrorBoundary>{children}</ErrorBoundary>
|
|
|
|
</>
|
|
|
|
</main>
|
|
|
|
</Shell>
|
2021-09-29 21:33:18 +00:00
|
|
|
);
|
|
|
|
}
|