Skip to content

Commit

Permalink
feat: styling
Browse files Browse the repository at this point in the history
  • Loading branch information
LuisParedes1 committed Dec 5, 2023
1 parent 9f3c7d8 commit 3938dd0
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 11 deletions.
4 changes: 2 additions & 2 deletions src/screens/profile/components/edit-profile-button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ export const EditProfileButton = ({

if (user?.id === currentUser?.id) {
return (
<View className="flex justify-center">
<View className="flex justify-center">
<Button
label="Edit"
className="mb-2 mt-4 rounded-full bg-blue-400 px-4 py-2 text-center font-bold text-white shadow hover:bg-blue-500"
className="mt-4 rounded-full bg-blue-400 px-4 py-2 text-center font-bold text-white shadow hover:bg-blue-500"
onPress={() => {
navigation.navigate('EditProfileScreen', { user: currentUser });
}}
Expand Down
2 changes: 1 addition & 1 deletion src/screens/profile/components/profile-bio.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ type ProfileBioProps = {
export const ProfileBio = ({ user }: ProfileBioProps) => {
return (
<>
<View className="text-center">
<View className="py-5 text-center">
<Text className="mb-1 text-2xl font-bold leading-normal text-slate-700">
{user?.first_name} {user?.last_name}
</Text>
Expand Down
2 changes: 1 addition & 1 deletion src/screens/profile/components/stadistics-button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const StadisticsButton = ({

if (user?.id === currentUser?.id) {
return (
<View className="mb-2 flex justify-center">
<View className="flex justify-center">
<Button
label="Stats"
className="mt-4 rounded-full bg-violet-400 px-4 py-2 text-center font-bold text-white shadow"
Expand Down
2 changes: 1 addition & 1 deletion src/screens/profile/components/verify-button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const VerifyButton = ({

if (user?.id === currentUser?.id) {
return (
<View className="mb-2 flex justify-center">
<View className=" flex justify-center">
<Button
label="Verify"
className="mt-4 rounded-full bg-green-400 px-4 py-2 text-center font-bold text-white shadow"
Expand Down
23 changes: 17 additions & 6 deletions src/screens/profile/profile-view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { useEffect, useState } from 'react';

import { getUserState } from '@/core/auth';
import type { UserType } from '@/core/auth/utils';
import { View } from '@/ui';
import { Button, View } from '@/ui';

import EditProfileButton from './components/edit-profile-button';
import { FollowActions } from './components/follow-actions';
Expand All @@ -23,6 +23,8 @@ const ProfileScreenView = ({
}) => {
const currentUser = getUserState();

const [moreOptions, setMoreOptions] = useState<boolean>(false);

const [isFollowing, setIsFollowing] = useState<boolean>(
user?.is_followed || false
);
Expand Down Expand Up @@ -57,11 +59,20 @@ const ProfileScreenView = ({
followerCount={followerCount}
followingCount={followingCount}
/>
<View className=" border-gray-200 flex flex-row py-5 justify-between">
<EditProfileButton user={user} currentUser={currentUser} />
<StadisticsButton user={user} currentUser={currentUser} />
<VerifyButton user={user} currentUser={currentUser} />
</View>

<Button
className="py-18 mx-20 mt-3 flex items-center justify-center rounded-full bg-blue-400 px-6 text-center font-bold text-black shadow"
onPress={() => setMoreOptions(!moreOptions)}
label={moreOptions ? 'Less Options' : 'More Options'}
/>

{moreOptions ? (
<View className=" flex flex-row justify-between border-gray-200 py-1">
<EditProfileButton user={user} currentUser={currentUser} />
<StadisticsButton user={user} currentUser={currentUser} />
<VerifyButton user={user} currentUser={currentUser} />
</View>
) : null}
<ProfileBio user={user} />
</View>
);
Expand Down

0 comments on commit 3938dd0

Please sign in to comment.