aboutsummaryrefslogtreecommitdiffstats
path: root/apps/mobile/components/settings/UserProfileHeader.tsx
blob: 6e389877df290804f7a8f1c1fe2393866842f087 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import { View } from "react-native";
import { Avatar } from "@/components/ui/Avatar";
import { Text } from "@/components/ui/Text";

interface UserProfileHeaderProps {
  image?: string | null;
  name?: string | null;
  email?: string | null;
}

export function UserProfileHeader({
  image,
  name,
  email,
}: UserProfileHeaderProps) {
  return (
    <View className="w-full items-center gap-2 py-6">
      <Avatar image={image} name={name} size={88} />
      <View className="items-center gap-1">
        <Text className="text-xl font-semibold">{name || "User"}</Text>
        {email && (
          <Text className="text-sm text-muted-foreground">{email}</Text>
        )}
      </View>
    </View>
  );
}