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

43 lines
891 B
TypeScript
Raw Normal View History

import { CreditCardIcon, KeyIcon, UserGroupIcon, UserIcon } from "@heroicons/react/solid";
import React from "react";
2021-10-13 09:34:55 +00:00
import { useLocale } from "@lib/hooks/useLocale";
import NavTabs from "./NavTabs";
export default function SettingsShell({ children }: { children: React.ReactNode }) {
2021-10-13 09:34:55 +00:00
const { t } = useLocale();
const tabs = [
{
2021-10-13 09:34:55 +00:00
name: t("profile"),
href: "/settings/profile",
icon: UserIcon,
},
{
2021-10-13 09:34:55 +00:00
name: t("security"),
href: "/settings/security",
icon: KeyIcon,
},
{
2021-10-13 09:34:55 +00:00
name: t("teams"),
href: "/settings/teams",
icon: UserGroupIcon,
},
{
2021-10-13 09:34:55 +00:00
name: t("billing"),
href: "/settings/billing",
icon: CreditCardIcon,
},
];
return (
<>
<div className="sm:mx-auto">
<NavTabs tabs={tabs} />
</div>
<main className="max-w-4xl">{children}</main>
</>
);
}