Skip to main content

UserDropdown

The UserDropdown component provides a dropdown menu for logged-in users with options like logout and billing management.

Usage

import { UserDropdown } from "@/components/dashboard/UserDropdown";
import { User } from "@supabase/supabase-js";
function DashboardHeader({ user }: { user: User }) {
return (
<header>
<UserDropdown user={user} />
</header>
);
}

Props

  • user: The current user object from Supabase

Functionality

  • Displays the user's email
  • Provides options to manage billing, toggle theme, and log out
  • Integrates with Supabase for authentication
  • Uses next-themes for theme toggling

Customization

The component uses Tailwind CSS and shadcn/ui components for styling. You can customize the appearance by modifying the CSS classes or updating the Tailwind configuration.