Skip to content

Commit

Permalink
Merge pull request #103 from bambu-group-03/feat/verified
Browse files Browse the repository at this point in the history
feat: verified
  • Loading branch information
LuisParedes1 authored Dec 5, 2023
2 parents 1c56d2b + 2b18c86 commit 0b6b41e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/core/auth/utils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export type UserType = {
dni?: string;
img_1_url?: string;
img_2_url?: string;
certified?: boolean;
};

export const getToken = () => getItem<TokenType>(TOKEN);
Expand Down
19 changes: 15 additions & 4 deletions src/screens/profile/components/profle-header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import React from 'react';

import type { UserType } from '@/core/auth/utils';
import { Image, Text, View } from '@/ui';
import { FontAwesomeIcon } from '@fortawesome/react-native-fontawesome';
import { faCheckCircle } from '@fortawesome/free-solid-svg-icons';

type ProfileHeaderProps = {
user: UserType | undefined;
Expand All @@ -14,13 +16,22 @@ export const ProfileHeader = ({ user }: ProfileHeaderProps) => {
<View className="relative">
<Image
source={user?.profile_photo_id}
className="order-1 h-28 w-28 rounded-full" // Adjusted size to h-32 and w-32
className="order-1 h-28 w-28 rounded-full"
/>
</View>
</View>
<Text className="block text-center text-xl font-bold tracking-wide text-slate-700">
@{user?.username}
</Text>
<View className=" border-gray-200 flex py-5 justify-between items-center">
<Text className="block text-center text-xl font-bold tracking-wide text-slate-700">
@{user?.username}
</Text>
{user?.certified ? (
<View className="py-2">
<FontAwesomeIcon icon={faCheckCircle} size={20} color="#1DA1F2" />
</View>
) : (
<></>
)}
</View>
</>
);
};

0 comments on commit 0b6b41e

Please sign in to comment.