Skip to content

Commit a576caa

Browse files
authored
Merge pull request #538 from depromeet/develop
배포용 PR v2.3.9
2 parents 81b1af2 + a6ef7e7 commit a576caa

File tree

11 files changed

+115
-47
lines changed

11 files changed

+115
-47
lines changed

src/apis/member.ts

+3-9
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,6 @@ import {
1212
} from '@tanstack/react-query';
1313
import axios from 'axios';
1414

15-
interface WithdrawalMemberRequest {
16-
username: string;
17-
}
18-
1915
interface CheckUsernameRequest {
2016
username: string;
2117
}
@@ -48,10 +44,8 @@ export const AUTH_PROVIDER_LABEL = {
4844
type MemberMeResponse = MemberType;
4945

5046
const MEMBER_API = {
51-
withdrawalMember: async (request: WithdrawalMemberRequest) => {
52-
const { data } = await apiInstance.delete(`/members/withdrawal`, {
53-
data: request,
54-
});
47+
withdrawalMember: async () => {
48+
const { data } = await apiInstance.delete(`/members/withdrawal`);
5549
return data;
5650
},
5751
getMembersMe: async (): Promise<MemberMeResponse> => {
@@ -138,7 +132,7 @@ export const useGetMembersMe = (option?: UseQueryOptions<MemberMeResponse>) => {
138132
});
139133
};
140134

141-
export const useWithdrawalMember = (option?: UseMutationOptions<unknown, unknown, WithdrawalMemberRequest>) => {
135+
export const useWithdrawalMember = (option?: UseMutationOptions<unknown, unknown>) => {
142136
return useMutation({
143137
mutationFn: MEMBER_API.withdrawalMember,
144138
...option,

src/app/feed/FeedList.tsx

+24
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
'use client';
22
import { useFeedMe } from '@/apis/feed';
33
import FeedItem, { FeedSkeletonItem } from '@/app/feed/FeedItem';
4+
import Empty from '@/components/Empty/Empty';
5+
import { ROUTER } from '@/constants/router';
46
import { css } from '@styled-system/css';
57

68
function FeedList() {
@@ -13,6 +15,21 @@ function FeedList() {
1315
</ul>
1416
);
1517

18+
if (data.length === 0) {
19+
return (
20+
<div className={emptyFeedCss}>
21+
<Empty
22+
type={'suggest'}
23+
image={'docs'}
24+
link={ROUTER.SEARCH.HOME}
25+
title={'피드가 없습니다.'}
26+
buttonText={'친구 찾기'}
27+
description={'친구를 팔로우하고 피드를 받아볼까요?'}
28+
/>
29+
</div>
30+
);
31+
}
32+
1633
return (
1734
<ul className={feedListCss}>
1835
{data.map((feed) => (
@@ -24,6 +41,13 @@ function FeedList() {
2441

2542
export default FeedList;
2643

44+
const emptyFeedCss = css({
45+
display: 'flex',
46+
justifyContent: 'center',
47+
alignItems: 'center',
48+
height: 'calc(100vh - 200px)',
49+
});
50+
2751
const feedListCss = css({
2852
padding: '0 16px 132px 16px',
2953
display: 'flex',

src/app/feed/page.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export default function FeedPage() {
88
<>
99
<AppBar />
1010
<FeedList />
11-
<BottomDim />
11+
<BottomDim type={'bottomDim2'} />
1212
<AppBarBottom />
1313
</>
1414
);

src/app/level/guide/page.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ function LevelGuidePage() {
4545
) : (
4646
<>
4747
<section className={levelTextWrapperCss}>
48-
<p className={levelLabelCss}>현재 레벨</p>
48+
<p className={levelLabelCss}>{!isLockedLevel && '현재 레벨'}</p>
4949
<div className={cx(badgeCss)}>
5050
<MotionDiv key={selectLevelInfo.label}>{selectLevelInfo.label}</MotionDiv>
5151
</div>
@@ -95,6 +95,7 @@ const levelLabelCss = css({
9595
textStyle: 'body5',
9696
color: 'purple.purple700',
9797
marginBottom: '8px',
98+
height: '17px',
9899
});
99100

100101
const badgeCss = css({

src/app/mypage/ProfileFeedList.tsx

+16
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import Link from 'next/link';
22
import { useFeedByMemberId } from '@/apis/feed';
33
import ProfileFeedItem, { ProfileFeedItemSkeleton } from '@/app/mypage/ProfileFeedItem';
4+
import Empty from '@/components/Empty/Empty';
45
import { EVENT_LOG_CATEGORY, EVENT_LOG_NAME } from '@/constants/eventLog';
56
import { ROUTER } from '@/constants/router';
67
import { eventLogger } from '@/utils';
@@ -23,6 +24,14 @@ function ProfileFeedList({ memberId, isMySelf }: { memberId: number; isMySelf: b
2324
<ProfileFeedItemSkeleton />
2425
</ul>
2526
);
27+
28+
if (data.length === 0) {
29+
return (
30+
<div className={emptyFeedCss}>
31+
<Empty type={'notice'} image={'docs'} title={'아직 작성한 피드가 없어요.'} description={''} />
32+
</div>
33+
);
34+
}
2635
return (
2736
<ul className={feedListCss}>
2837
{data?.map((feed) => (
@@ -43,6 +52,13 @@ const getHref = (recordId: string, isMySelf: boolean) => {
4352
return ROUTER.RECORD.DETAIL.FOLLOW(recordId);
4453
};
4554

55+
const emptyFeedCss = css({
56+
display: 'flex',
57+
justifyContent: 'center',
58+
alignItems: 'center',
59+
padding: '60px 0',
60+
});
61+
4662
const feedListCss = css({
4763
display: 'grid',
4864
padding: '0 0 132px 0',

src/app/mypage/page.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ function Mypage() {
3030
<Header />
3131
<MyProfile />
3232
<AppBarBottom />
33-
<div className={dimCss} />
34-
<BottomDim />
33+
<div className={profileBackgroundDimCss} />
34+
<BottomDim type={'bottomDim2'} />
3535
</main>
3636
);
3737
}
@@ -43,7 +43,7 @@ const backgroundCss = css({
4343
background: 'gradients.primary',
4444
});
4545

46-
const dimCss = css({
46+
const profileBackgroundDimCss = css({
4747
position: 'absolute',
4848
width: '100%',
4949
height: '100%',

src/app/mypage/withdrawal/page.tsx

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use client';
22

33
import { useRouter } from 'next/navigation';
4-
import { useGetMembersMe, useWithdrawalMember } from '@/apis/member';
4+
import { useWithdrawalMember } from '@/apis/member';
55
import Button from '@/components/Button/Button';
66
import { useSnackBar } from '@/components/SnackBar/SnackBarProvider';
77
import { ROUTER } from '@/constants/router';
@@ -11,7 +11,6 @@ import { grid } from '@/styled-system/patterns';
1111

1212
function WithdrawalPage() {
1313
const router = useRouter();
14-
const { data } = useGetMembersMe();
1514
const { triggerSnackBar } = useSnackBar();
1615
const { mutate } = useWithdrawalMember({
1716
onSuccess: () => {
@@ -33,8 +32,7 @@ function WithdrawalPage() {
3332
};
3433

3534
const onWithdrawal = () => {
36-
if (!data?.username) return;
37-
mutate({ username: data.username });
35+
mutate();
3836
};
3937

4038
return (

src/app/profile/[id]/ProfileContent.tsx

+5-2
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,7 @@ function ProfileContent({
4545
<span className={followerTabCss}>
4646
<Link onClick={handleClickFollowList} href={ROUTER.PROFILE.FOLLOW_LIST(memberId, 'following')}>
4747
팔로잉 {followingCount}
48-
</Link>{' '}
49-
&nbsp;
48+
</Link>
5049
<Link onClick={handleClickFollowList} href={ROUTER.PROFILE.FOLLOW_LIST(memberId, 'follower')}>
5150
팔로워 {followerCount}
5251
</Link>
@@ -92,7 +91,11 @@ const userNameCss = css({
9291
});
9392
const followerTabCss = css({
9493
color: 'text.secondary',
94+
textStyle: 'body5',
9595
marginTop: '6px',
96+
97+
display: 'flex',
98+
gap: '10px',
9699
});
97100

98101
const myTabCss = css({

src/app/profile/[id]/page.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ function FollowProfilePage({ params }: { params: { id: string } }) {
3636
>
3737
<ProfileTab memberId={Number(params.id)} />
3838
</ProfileContent>
39-
<div className={dimCss} />
40-
<BottomDim />
39+
<div className={profileBackgroundDimCss} />
40+
<BottomDim type={'bottomDim2'} />
4141
</main>
4242
);
4343
}
@@ -52,7 +52,7 @@ const backgroundCss = css({
5252
background: 'gradients.primary',
5353
});
5454

55-
const dimCss = css({
55+
const profileBackgroundDimCss = css({
5656
position: 'absolute',
5757
width: '100%',
5858
height: '100%',

src/components/Banner/CardBanner.tsx

+20-8
Original file line numberDiff line numberDiff line change
@@ -4,32 +4,44 @@ import { css } from '@/styled-system/css';
44

55
function CardBanner(props: CardBannerType) {
66
return (
7-
<div className={containerCss}>
8-
<div>
9-
<Image src={props.iconUrl} width={20} height={20} alt={props.title} />
7+
<div className={outerContainerCss}>
8+
<div className={containerCss}>
9+
<div>
10+
<Image src={props.iconUrl} width={20} height={20} alt={props.title} />
11+
</div>
12+
<p className={descriptionCss}>{props.description}</p>
13+
<p className={titleCss}>{props.title}</p>
1014
</div>
11-
<p className={descriptionCss}>{props.description}</p>
12-
<p className={titleCss}>{props.title}</p>
1315
</div>
1416
);
1517
}
1618

1719
export default CardBanner;
1820

1921
const containerCss = css({
20-
minWidth: 'fit-content',
2122
width: '100%',
23+
height: '100%',
24+
minWidth: 'fit-content',
2225
overflow: 'hidden',
23-
borderRadius: '22px',
2426
boxShadow: '0px 10px 30px 4px rgba(78, 80, 122, 0.20) inset, 0px 4px 20px 0px rgba(15, 16, 23, 0.30)',
25-
border: ' 1px solid #474A5D',
2627
padding: '20px 16px 16px',
2728
background: 'linear-gradient(136deg, rgba(168, 184, 240, 0.02) 15.95%, rgba(165, 143, 255, 0.02) 85.07%)',
2829
display: 'flex',
2930
flexDirection: 'column',
3031
alignItems: 'center',
3132
});
3233

34+
const outerContainerCss = css({
35+
overflow: 'hidden',
36+
border: '1px solid transparent',
37+
borderRadius: '22px',
38+
padding: '0px !', // NOTE: padding 0 필수,
39+
backgroundOrigin: 'border-box',
40+
backgroundClip: 'content-box, border-box',
41+
backgroundImage:
42+
'linear-gradient(token(colors.bg.surface3), token(colors.bg.surface3)), token(colors.gradients.stroke)',
43+
});
44+
3345
const descriptionCss = css({
3446
marginTop: '8px',
3547
textStyle: 'body4',
+36-16
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,42 @@
1-
import { css } from '@/styled-system/css';
1+
import { cva } from '@/styled-system/css';
22

3-
function BottomDim() {
4-
return <article className={containerCss}></article>;
3+
function BottomDim({ type = 'bottomDim1' }: { type?: 'bottomDim1' | 'bottomDim2' }) {
4+
return (
5+
<article
6+
className={containerCss({
7+
type: type,
8+
})}
9+
></article>
10+
);
511
}
612

713
export default BottomDim;
814

9-
const containerCss = css({
10-
width: '100vw',
11-
height: '200px',
12-
maxWidth: '475px',
13-
margin: '0 auto',
14-
position: 'fixed',
15-
left: 0,
16-
right: 0,
17-
bottom: 0,
18-
zIndex: 'bottomDim',
19-
background:
20-
'linear-gradient(180deg, rgba(24, 24, 29, 0.00) 0%, rgba(24, 24, 29, 0.09) 7.58%, rgba(24, 24, 29, 0.59) 34.59%, rgba(24, 24, 29, 0.69) 41.18%, rgba(24, 24, 29, 0.83) 51.39%, #18181D 63.25%)',
21-
pointerEvents: 'none',
15+
const containerCss = cva({
16+
base: {
17+
width: '100vw',
18+
maxWidth: '475px',
19+
margin: '0 auto',
20+
position: 'fixed',
21+
left: 0,
22+
right: 0,
23+
bottom: 0,
24+
zIndex: 'bottomDim',
25+
pointerEvents: 'none',
26+
},
27+
variants: {
28+
type: {
29+
bottomDim1: {
30+
background:
31+
'linear-gradient(180deg, rgba(24, 24, 29, 0.00) 0%, rgba(24, 24, 29, 0.09) 7.58%, rgba(24, 24, 29, 0.59) 34.59%, rgba(24, 24, 29, 0.69) 41.18%, rgba(24, 24, 29, 0.83) 51.39%, #18181D 63.25%)',
32+
height: '200px',
33+
},
34+
35+
bottomDim2: {
36+
background:
37+
'linear-gradient(180deg, rgba(24, 24, 29, 0.00) 0%, rgba(24, 24, 29, 0.10) 15.1%, rgba(24, 24, 29, 0.61) 51.56%, rgba(24, 24, 29, 0.73) 70.83%, rgba(24, 24, 29, 0.85) 86.98%, #18181D 100%)',
38+
height: '156px',
39+
},
40+
},
41+
},
2242
});

0 commit comments

Comments
 (0)