2022-04-26 08:48:17 +00:00
|
|
|
import { CreditCardIcon, KeyIcon, LockClosedIcon, UserGroupIcon, UserIcon } from "@heroicons/react/solid";
|
2021-09-30 19:59:34 +00:00
|
|
|
import React from "react";
|
2021-09-29 21:33:18 +00:00
|
|
|
|
2022-04-26 08:48:17 +00:00
|
|
|
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
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
|
|
|
|
2021-09-30 19:59:34 +00:00
|
|
|
export default function SettingsShell({ children }: { children: React.ReactNode }) {
|
2021-10-13 09:34:55 +00:00
|
|
|
const { t } = useLocale();
|
|
|
|
|
2021-09-29 21:33:18 +00:00
|
|
|
const tabs = [
|
|
|
|
{
|
2021-10-13 09:34:55 +00:00
|
|
|
name: t("profile"),
|
2021-09-29 21:33:18 +00:00
|
|
|
href: "/settings/profile",
|
|
|
|
icon: UserIcon,
|
|
|
|
},
|
|
|
|
{
|
2021-10-13 09:34:55 +00:00
|
|
|
name: t("security"),
|
2021-09-29 21:33:18 +00:00
|
|
|
href: "/settings/security",
|
|
|
|
icon: KeyIcon,
|
|
|
|
},
|
|
|
|
{
|
2021-10-13 09:34:55 +00:00
|
|
|
name: t("teams"),
|
2021-09-29 21:33:18 +00:00
|
|
|
href: "/settings/teams",
|
|
|
|
icon: UserGroupIcon,
|
|
|
|
},
|
|
|
|
{
|
2021-10-13 09:34:55 +00:00
|
|
|
name: t("billing"),
|
2021-09-29 21:33:18 +00:00
|
|
|
href: "/settings/billing",
|
|
|
|
icon: CreditCardIcon,
|
|
|
|
},
|
2022-04-26 08:48:17 +00:00
|
|
|
{
|
|
|
|
name: t("admin"),
|
|
|
|
href: "/settings/admin",
|
|
|
|
icon: LockClosedIcon,
|
|
|
|
adminRequired: true,
|
|
|
|
},
|
2021-09-29 21:33:18 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
return (
|
2021-09-30 19:59:34 +00:00
|
|
|
<>
|
2021-09-29 21:33:18 +00:00
|
|
|
<div className="sm:mx-auto">
|
|
|
|
<NavTabs tabs={tabs} />
|
|
|
|
</div>
|
2021-09-30 19:59:34 +00:00
|
|
|
<main className="max-w-4xl">{children}</main>
|
|
|
|
</>
|
2021-09-29 21:33:18 +00:00
|
|
|
);
|
|
|
|
}
|