Skip to content
This repository has been archived by the owner on Mar 23, 2024. It is now read-only.

Commit

Permalink
feat: add friend button (at user modal)
Browse files Browse the repository at this point in the history
  • Loading branch information
pupixipup committed Feb 23, 2024
1 parent ea02298 commit 4db1416
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions client/src/widgets/modals/info-modal/user/desktop/desktop.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
import { Button, Modal, Typography, Flex, ImageLoader } from '@/shared/ui';
import { FC } from 'react';
import { ArrowRightIcon, UserPlusIcon, ChatCircleDotsIcon } from '@/shared/assets';
import { ArrowRightIcon, ChatCircleDotsIcon } from '@/shared/assets';
import { calculateAge, getCountryFlag } from '@/shared/lib';
import { InfoModalUserProps } from '../interfaces';
import { IconLayout } from '../ui/icon-layout/icon-layout';
import { TextLayout } from '../ui/text-layout/text-layout';
import { FriendButton } from '@/features/friend-button';
import { useGetMe } from '@/entities/session';

export const UserDesktop: FC<InfoModalUserProps> = ({ user, isOpenModal, handleClose }) => {
const age = user?.dateOfBirth ? calculateAge(user.dateOfBirth) : null;
const { data: me } = useGetMe();

return (
<>
Expand Down Expand Up @@ -54,12 +57,7 @@ export const UserDesktop: FC<InfoModalUserProps> = ({ user, isOpenModal, handleC
<IconLayout coreTools={user?.skills?.coreTools} />
<Flex justify='space-between' align='center' margin='24px 0 0 0'>
<Flex gap='8px'>
{
<Button typeBtn='primary' size='m'>
Connect
<UserPlusIcon />
</Button>
}
{user?.id && <FriendButton myId={me?.id} userId={user.id} />}

<Button typeBtn='secondary' size='m'>
Message
Expand Down

0 comments on commit 4db1416

Please sign in to comment.