Skip to content

Commit 90c33af

Browse files
authored
Merge pull request #106 from Chaellimi/feat/#94
[Feat/#94] 홈화면 디자인 개선 및 프로필 수정 완성
2 parents 1d97fd5 + ba066ff commit 90c33af

File tree

18 files changed

+613
-72
lines changed

18 files changed

+613
-72
lines changed

public/icons/Profile/Pen.tsx

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import React from 'react';
2+
3+
const PenIcon = () => {
4+
return (
5+
<svg
6+
xmlns="http://www.w3.org/2000/svg"
7+
width="19"
8+
height="19"
9+
viewBox="0 0 19 19"
10+
fill="none"
11+
>
12+
<path
13+
d="M15.6337 3.36608C14.766 2.49842 13.3593 2.49842 12.4916 3.36608L3.0229 12.8348C2.89631 12.9614 2.8252 13.1331 2.8252 13.3121V15.4996C2.8252 15.8724 3.1274 16.1746 3.50019 16.1746H5.68769C5.86671 16.1746 6.03839 16.1035 6.16498 15.9769L15.6337 6.50817C16.5014 5.64051 16.5014 4.23375 15.6337 3.36608Z"
14+
fill="#848484"
15+
/>
16+
</svg>
17+
);
18+
};
19+
20+
export default PenIcon;

public/icons/Profile/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ export { default as BookmarkIcon } from './Bookmark';
66
export { default as NotificationIcon } from './Notification';
77
export { default as MailIcon } from './Mail';
88
export { default as PaperIcon } from './Paper';
9+
export { default as PenIcon } from './Pen';

public/icons/shared/Fire.tsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
11
import React from 'react';
22

3-
const FireIcon = () => {
3+
interface FireIconProps {
4+
width?: string;
5+
height?: string;
6+
}
7+
8+
const FireIcon = ({ width, height }: FireIconProps) => {
49
return (
510
<svg
611
xmlns="http://www.w3.org/2000/svg"
7-
width="17"
8-
height="17"
12+
width={width || '17'}
13+
height={height || '17'}
914
viewBox="0 0 16 17"
1015
fill="none"
1116
>

public/images/HomeBanner.png

-18.3 KB
Loading

src/app/(private)/()/page.tsx

Lines changed: 15 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import Banner from '@public/images/HomeBanner.png';
77
import ActiveChallenge from '@/components/Home/ActiveChallenge';
88
import HotChallenge from '@/components/Home/HotChallenge';
99
import Header from '@/components/shared/Header';
10-
import { ArrowIcon } from '@public/icons/shared';
10+
import { ArrowIcon, FireIcon } from '@public/icons/shared';
1111
import {
1212
useGetParticipatingChallenge,
1313
useGetPopularChallenge,
@@ -70,12 +70,6 @@ const Home = () => {
7070
return `${certifiedCount}/${total}`;
7171
}
7272

73-
function getCompletedChallengeCount() {
74-
return ParticipatingChallengeData?.data.filter(
75-
(item: ParticipatingChallenge) => item.achievementRate >= 100
76-
).length;
77-
}
78-
7973
useStatusBarBridge({
8074
backgroundColor: '#FFF',
8175
translucent: true,
@@ -151,44 +145,22 @@ const Home = () => {
151145
</div>
152146
) : null}
153147

154-
{/* Complete Challenge */}
155-
{ParticipatingChallengeData?.data.length != 0 &&
156-
ParticipatingChallengeData?.data.some(
157-
(item: ParticipatingChallenge) => item.achievementRate === 100
158-
) ? (
159-
<div className="flex flex-col gap-2 mt-5">
160-
<div className="flex items-center justify-between">
161-
<div className="text-he">완료한 챌린지</div>
162-
<div className="text-gray-300 text-fn">
163-
{getCompletedChallengeCount()}개 완료
148+
<div className="flex justify-between w-full px-5 py-4 mt-5 border border-gray-100 rounded-xl">
149+
<div className="flex items-center gap-[0.62rem]">
150+
<FireIcon width="28" height="28" />
151+
<div className="">
152+
<div className="text-gray-600 text-c1">
153+
오늘 추천 챌린지 도착!
154+
</div>
155+
<div className="text-primary-hover text-h3">
156+
AI가 고른 맞춤 챌린지
164157
</div>
165-
</div>
166-
167-
<div className="flex w-full overflow-scroll gap-[0.62rem] scrollbar-hide">
168-
{ParticipatingChallengeData?.data.map(
169-
(item: ParticipatingChallenge) => {
170-
if (item.achievementRate >= 100) {
171-
return (
172-
<ActiveChallenge
173-
key={item.challengeId}
174-
isActive={
175-
item.isCertifiedToday || item.achievementRate >= 100
176-
}
177-
title={item.challenge.title}
178-
time={'고정값'}
179-
imgURL={item.challenge.imgURL}
180-
certificationLink={`/challenge/${item.challengeId}/certification`}
181-
progressLink={`/challenge/${item.challengeId}/progress`}
182-
/>
183-
);
184-
} else {
185-
return '';
186-
}
187-
}
188-
)}
189158
</div>
190159
</div>
191-
) : null}
160+
<div className="flex items-center">
161+
<ArrowIcon width="18" height="18" location="right" fill="#C9C9C9" />
162+
</div>
163+
</div>
192164

193165
{/* Hot Challenge */}
194166
<div className="flex flex-col gap-2 mt-5">
@@ -198,7 +170,7 @@ const Home = () => {
198170
router.push('/challenge');
199171
}}
200172
>
201-
<div className="text-he">요즘 뜨는 챌린지</div>
173+
<div className="text-he">이런 챌린지는 어때요?</div>
202174
<ArrowIcon width="24" height="24" location="right" />
203175
</div>
204176
<div className="flex overflow-scroll gap-[0.62rem] scrollbar-hide">

src/app/(private)/challenge/[id]/progress/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ const Progress = () => {
138138
<div className="grid grid-cols-3 gap-y-4 gap-x-2 justify-items-center">
139139
{progressDates.map((dateStr, index) => {
140140
const today = dayjs().format('YYYY-MM-DD');
141-
const isFeature = new Date(dateStr) < new Date(today);
141+
const isFeature = new Date(dateStr) <= new Date(today);
142142
const isCertified = certifiedSet.has(dateStr);
143143

144144
return (

src/app/(private)/point/shop/[id]/page.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ const ShopDetail = () => {
5353
backClick="/point/shop"
5454
/>
5555

56-
<div className="relative flex flex-col justify-between pb-[1.38rem] overflow-y-scroll scrollbar-hide w-full">
56+
<div className="relative flex flex-col justify-between w-full pb-20 overflow-y-scroll scrollbar-hide">
5757
<div className="flex flex-col w-full gap-4 px-6">
5858
<div className="relative rounded-full min-h-[20.5rem] max-h-[20.5rem] min-w[20.5rem] max-w-[20.5rem]">
5959
<div className="relative w-[328px] h-[328px] mx-auto">
@@ -68,7 +68,9 @@ const ShopDetail = () => {
6868

6969
<div>
7070
<div className="text-c1">{productData?.brand}</div>
71-
<div className="text-h3">{productData?.price}P</div>
71+
<div className="text-h3">
72+
{Number(productData?.price).toLocaleString()}P
73+
</div>
7274
<div className="text-b3">{productData?.title}</div>
7375
</div>
7476

src/app/(private)/profile/page.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,10 @@ const Profile = () => {
5252

5353
<div className="flex flex-col flex-1 gap-4 px-6 mt-4 mb-16 overflow-y-auto scrollbar-hide">
5454
{/* 프로필 */}
55-
<div className="flex items-center justify-between w-full p-4 bg-white rounded-2xl min-h-fit">
55+
<div
56+
className="flex items-center justify-between w-full p-4 bg-white rounded-2xl min-h-fit"
57+
onClick={() => router.push('/profile/user')}
58+
>
5659
<div className="flex items-center gap-4">
5760
<div className="relative w-[72px] h-[72px] rounded-full flex-shrink-0">
5861
<Image

0 commit comments

Comments
 (0)