Skip to content

Commit 7fcfee2

Browse files
authored
feat(client): 프로필 카드 컴포넌트에 포트폴리오, 이력서, 깃허브 입력 유무 표시 (#386)
* feat(client): 프로필 카드 컴포넌트에 포트폴리오, 이력서, 깃허브 입력 유무 표시 * feat(client): 아이콘 마다 툴팁 추가
1 parent b27bd7f commit 7fcfee2

File tree

9 files changed

+83
-36
lines changed

9 files changed

+83
-36
lines changed
Lines changed: 3 additions & 0 deletions
Loading

apps/client/public/next.svg

Lines changed: 0 additions & 1 deletion
This file was deleted.

apps/client/public/vercel.svg

Lines changed: 0 additions & 1 deletion
This file was deleted.

apps/client/src/components/common/Header/index.tsx

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,7 @@ const Header = () => {
3939
{!isLoading && (
4040
<Stack direction="horizontal" align="center" spacing={12}>
4141
{user.isLogin && (
42-
<StyledNotificationButtonWrapper>
43-
<NotificationButton hasNotification={user.hasNotification} />
44-
</StyledNotificationButtonWrapper>
42+
<NotificationButton hasNotification={user.hasNotification} />
4543
)}
4644
{user.isLogin ? (
4745
<Button onClick={handleLogout} styleType="ghost" size="small">
@@ -69,7 +67,3 @@ const StyledHeader = styled.div`
6967
background-color: ${theme.colors.white};
7068
`}
7169
`;
72-
73-
const StyledNotificationButtonWrapper = styled.div`
74-
position: relative;
75-
`;

apps/client/src/components/profile/ProfileCard/index.tsx

Lines changed: 60 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,14 @@
11
import styled from '@emotion/styled';
2-
import { Stack, Text } from '@sickgyun/ui';
2+
import { IconReviewStarFill, IconStoryArticleFill } from '@seed-design/icon';
3+
import { colors } from '@sickgyun/design-token';
4+
import { Stack, Text, Tooltip } from '@sickgyun/ui';
35
import { useOverlay } from '@toss/use-overlay';
46
import Image from 'next/image';
57
import ProfileDetailModal from '../ProfileDetailModal';
8+
import type { GetProfileListResponse } from '@/hooks/api/profile/useGetProfileList';
69
import { useLogAnalyticsEvent } from '@/libs/logging';
7-
import type { Major } from '@/types/profile';
810

9-
type ProfileCardProps = {
10-
name: string;
11-
imageUrl: string;
12-
cardinal: number;
13-
major: Major;
14-
profileId: number;
15-
userId: number;
16-
company?: string;
17-
introduction?: string;
18-
};
11+
type ProfileCardProps = Omit<GetProfileListResponse, 'id'>;
1912

2013
const ProfileCard = ({
2114
name,
@@ -26,6 +19,9 @@ const ProfileCard = ({
2619
userId,
2720
company,
2821
introduction,
22+
githubId,
23+
portfolioUrl,
24+
resumeUrl,
2925
}: ProfileCardProps) => {
3026
const overlay = useOverlay();
3127
const { logClickEvent } = useLogAnalyticsEvent();
@@ -68,13 +64,59 @@ const ProfileCard = ({
6864
</Text>
6965
</Stack>
7066
</Stack>
67+
<StyledProfilePresenceCheck direction="horizontal" align="center" spacing={8}>
68+
{portfolioUrl && (
69+
<Tooltip content="포트폴리오" placement="bottom-end">
70+
{({ ref }) => {
71+
return (
72+
<IconReviewStarFill
73+
ref={ref}
74+
width={20}
75+
height={20}
76+
color={colors.gray400}
77+
/>
78+
);
79+
}}
80+
</Tooltip>
81+
)}
82+
{resumeUrl && (
83+
<Tooltip content="이력서" placement="bottom-end">
84+
{({ ref }) => {
85+
return (
86+
<IconStoryArticleFill
87+
ref={ref}
88+
width={20}
89+
height={20}
90+
color={colors.gray400}
91+
/>
92+
);
93+
}}
94+
</Tooltip>
95+
)}
96+
{githubId && (
97+
<Tooltip content="깃허브" placement="bottom-end">
98+
{({ ref }) => {
99+
return (
100+
<Image
101+
ref={ref}
102+
src="/assets/svgs/github_icon.svg"
103+
width={20}
104+
height={20}
105+
alt="Github Logo"
106+
/>
107+
);
108+
}}
109+
</Tooltip>
110+
)}
111+
</StyledProfilePresenceCheck>
71112
</StyledProfileCard>
72113
);
73114
};
74115

75116
export default ProfileCard;
76117

77118
const StyledProfileCard = styled.div`
119+
position: relative;
78120
transition: all 0.25s ease;
79121
padding: 16px;
80122
border-radius: 8px;
@@ -90,3 +132,9 @@ const StyledProfileImage = styled(Image)`
90132
border-radius: 8px;
91133
object-fit: cover;
92134
`;
135+
136+
const StyledProfilePresenceCheck = styled(Stack)`
137+
position: absolute;
138+
right: 16px;
139+
bottom: 16px;
140+
`;

apps/client/src/components/profile/ProfileList/index.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ const ProfileList = ({ major, isRecruited, cardinal }: ProfileListProps) => {
4040
userId={profile.userId}
4141
company={profile.company}
4242
introduction={profile.introduction}
43+
portfolioUrl={profile.portfolioUrl}
44+
githubId={profile.githubId}
45+
resumeUrl={profile.resumeUrl}
4346
/>
4447
))}
4548
</StyledProfileList>

apps/client/src/components/profile/ProfileNavigationBar/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ const StyledProfileNavigationBar = styled.div`
162162
${({ theme }) => css`
163163
border-bottom: 1px solid ${theme.colors.gray200};
164164
background-color: ${theme.colors.white};
165+
z-index: ${theme.zIndex.component3};
165166
`}
166167
`;
167168

apps/client/src/hooks/api/profile/useGetProfileList.ts

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,17 @@ export type GetProfileListParams = {
1212

1313
export type GetProfileListResponse = {
1414
id: number;
15-
userId: number;
1615
name: string;
17-
admissionYear: number;
1816
imageUrl: string;
19-
major: Major;
20-
introduction: string;
21-
company: string;
22-
isRecruited: boolean;
2317
cardinal: number;
18+
major: Major;
19+
profileId: number;
20+
userId: number;
21+
company?: string;
22+
introduction?: string;
23+
githubId?: string;
24+
portfolioUrl?: string;
25+
resumeUrl?: string;
2426
};
2527

2628
export const PROFILE_LIST_QUERY_KEY = 'profileList';

packages/ui/src/Tooltip/index.tsx

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -102,14 +102,12 @@ const Tooltip = ({
102102
});
103103

104104
return (
105-
<>
106-
<PositionWrapper strategy={strategy}>
107-
{children({
108-
ref: refs.setReference,
109-
onOpen: openTooltip,
110-
referenceProps: getReferenceProps(),
111-
})}
112-
</PositionWrapper>
105+
<PositionWrapper strategy={strategy}>
106+
{children({
107+
ref: refs.setReference,
108+
onOpen: openTooltip,
109+
referenceProps: getReferenceProps(),
110+
})}
113111
<StyledCSSTransition
114112
nodeRef={transitionRef}
115113
in={isOpen}
@@ -134,7 +132,7 @@ const Tooltip = ({
134132
</StyledTooltipItem>
135133
</StyledTooltipItemWrapper>
136134
</StyledCSSTransition>
137-
</>
135+
</PositionWrapper>
138136
);
139137
};
140138

0 commit comments

Comments
 (0)