feat: add the admin page

This commit is contained in:
Catalin Pit
2023-09-08 11:28:50 +03:00
parent 171a5ba4ee
commit 67571158e8
6 changed files with 175 additions and 2 deletions

View File

@ -38,7 +38,7 @@ export type ProfileDropdownProps = {
export const ProfileDropdown = ({ user }: ProfileDropdownProps) => {
const { theme, setTheme } = useTheme();
const { getFlag } = useFeatureFlags();
const userIsAdmin = isAdmin(user);
const isUserAdmin = isAdmin(user);
const isBillingEnabled = getFlag('app_billing');
@ -69,7 +69,7 @@ export const ProfileDropdown = ({ user }: ProfileDropdownProps) => {
</Link>
</DropdownMenuItem>
{userIsAdmin && (
{isUserAdmin && (
<DropdownMenuItem asChild>
<Link href="/admin" className="cursor-pointer">
<UserCog className="mr-2 h-4 w-4" />