2022-05-26 17:07:14 +00:00
|
|
|
import React, { ComponentProps } from "react";
|
2021-09-29 21:33:18 +00:00
|
|
|
|
2022-07-28 19:58:26 +00:00
|
|
|
import ErrorBoundary from "@calcom/ui/ErrorBoundary";
|
2022-07-27 02:24:00 +00:00
|
|
|
import { Icon } from "@calcom/ui/Icon";
|
2022-07-28 19:58:26 +00:00
|
|
|
import Shell from "@calcom/ui/Shell";
|
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",
|
|
|
|
href: "/settings/profile",
|
2022-08-03 16:01:29 +00:00
|
|
|
icon: Icon.FiUser,
|
2022-05-26 17:07:14 +00:00
|
|
|
},
|
2022-06-01 17:24:41 +00:00
|
|
|
{
|
|
|
|
name: "teams",
|
|
|
|
href: "/settings/teams",
|
2022-08-03 16:01:29 +00:00
|
|
|
icon: Icon.FiUsers,
|
2022-06-01 17:24:41 +00:00
|
|
|
},
|
2022-05-26 17:07:14 +00:00
|
|
|
{
|
|
|
|
name: "security",
|
|
|
|
href: "/settings/security",
|
2022-08-03 16:01:29 +00:00
|
|
|
icon: Icon.FiKey,
|
2022-05-26 17:07:14 +00:00
|
|
|
},
|
|
|
|
{
|
2022-06-01 17:24:41 +00:00
|
|
|
name: "developer",
|
|
|
|
href: "/settings/developer",
|
2022-08-03 16:01:29 +00:00
|
|
|
icon: Icon.FiTerminal,
|
2022-05-26 17:07:14 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "billing",
|
|
|
|
href: "/settings/billing",
|
2022-08-03 16:01:29 +00:00
|
|
|
icon: Icon.FiCreditCard,
|
2022-05-26 17:07:14 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "admin",
|
|
|
|
href: "/settings/admin",
|
2022-08-03 16:01:29 +00:00
|
|
|
icon: Icon.FiLock,
|
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
|
|
|
);
|
|
|
|
}
|