Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
4ba2f17
refactor: 스터디 신청 버튼 디자인 수정
aken-you Aug 18, 2025
f1941c1
feat: 피드백 버튼 추가
aken-you Aug 18, 2025
7777017
refactor: 피드백 아이콘 가로길이 수정
aken-you Aug 18, 2025
7662040
feat: background 컬러 토큰 추가
aken-you Aug 20, 2025
3a9b7d9
feat: 스터디원 후기 작성 모달에서 보여줄 아이콘 추가
aken-you Aug 20, 2025
82c1a5d
feat: success background 컬러 토큰 추가
aken-you Aug 20, 2025
cfd197f
feat: checkbox 아이콘 파일 추가
aken-you Aug 21, 2025
3a0ff14
feat: 스터디 후기 모달에 보여줄 데이터 요청 커스텀훅 생성
aken-you Aug 21, 2025
e62a608
fix: Button 컴포넌트에서 cn 오타 수정
aken-you Aug 21, 2025
913982c
feat: 스터디 리뷰 후기 모달 생성
aken-you Aug 23, 2025
4a97b4d
feat: 스터디 리뷰 제출 api 커스텀 훅 생성
aken-you Aug 23, 2025
5cb4e66
feat: textarea onChange 핸들러 추가
aken-you Aug 23, 2025
0edb94b
feat: checkbox onToggle 핸들러 추가
aken-you Aug 23, 2025
24cb4da
refactor: checkbox border 굵기 수정
aken-you Aug 23, 2025
ecc5e08
refactor: 폼로직을 StudyReviewForm으로 분리
aken-you Aug 23, 2025
557993d
refactor: 등록하기 disabled 설정
aken-you Aug 23, 2025
3e63ea0
feat: 스터디 후기 추가되면, 안내 메세지 제공
aken-you Aug 23, 2025
d3f0f09
refactor: useSuspenseQuery로 변경하여 파트너 스터디 후기 쿼리 개선
aken-you Aug 23, 2025
da67164
refactor: 등록하기 disabled 수정
aken-you Aug 23, 2025
b5e426a
feat: 스터디 리뷰 페이지 view 완성
aken-you Aug 24, 2025
b1be385
refactor: user profile modal에서 사용자 정보를 입력하지 않았을 경우, 빈 문자열로 표시
aken-you Aug 24, 2025
b63525f
style: 계정 설정 주석 처리
aken-you Aug 24, 2025
ed2e15a
feat: 긍정적 평가 키워드 api 요청 커스텀 훅 생성
aken-you Aug 24, 2025
fb2d5db
feat: 부정적 평가 키워드 api 요청 커스텀 훅 생성
aken-you Aug 24, 2025
64b7788
refactor: 긍정적 키워드 목록의 queryKey 네이밍 수정
aken-you Aug 24, 2025
e778671
refactor: 키워드 response 타입 수정
aken-you Aug 24, 2025
f37d4e4
feat: 스터디 후기 조회 api 커스텀 훅 생성
aken-you Aug 24, 2025
3ae3a8b
refactor: 리뷰 border와 image 스타일 수정
aken-you Aug 24, 2025
b0eedf6
refactor: 한국 시간 포맷팅 함수 추가 및 사용 수정
aken-you Aug 24, 2025
addf349
refactor: ProfileInfoCard 레이어 widgets -> entities로 변경
aken-you Aug 24, 2025
1bd76b5
feat: 총 리뷰 받은 수 표시
aken-you Aug 24, 2025
59cecbe
refactor: KeywordReview 컴포넌트 entities 레이어로 이동
aken-you Aug 24, 2025
1ac1a71
refactor: UserProfileModal에 받은 평가 표시
aken-you Aug 24, 2025
6ebad6e
refactor: ProfileInfoCard와 ProfileInfoCard 도메인 변경
aken-you Aug 24, 2025
65b47c0
Merge branch 'develop' into feat/study-review
aken-you Aug 24, 2025
c4abb40
style: formatKoreaRelativeTime에서 1분 미만이면 "방금 전" 반환
aken-you Aug 24, 2025
747784b
refactor: features에 있는 UserProfileModal 삭제
aken-you Aug 25, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
212 changes: 212 additions & 0 deletions app/(my)/my-study-review/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,212 @@
'use client';

import Image from 'next/image';
import { useState } from 'react';
import KeywordReview from '@/entities/user/ui/keyword-review';
import { MyReviewItem } from '@/features/study/api/types';
import {
useMyNegativeKeywordsQuery,
useMyReviewsInfinityQuery,
useUserPositiveKeywordsQuery,
} from '@/features/study/model/use-review-query';
import { formatKoreaRelativeTime } from '@/shared/lib/time';

export default function MyStudyReview() {
const { data: positiveKeywordsData } = useUserPositiveKeywordsQuery({
pageSize: 5,
});
const { data: negativeKeywordsData } = useMyNegativeKeywordsQuery({
pageSize: 5,
});
const {
data: myReviewsData,
fetchNextPage,
hasNextPage,
} = useMyReviewsInfinityQuery();

const positiveKeywords = positiveKeywordsData?.keywords || [];
const negativeKeywords = negativeKeywordsData?.keywords || [];

const positiveKeywordsCount = positiveKeywordsData?.totalCount || 0;
const negativeKeywordsCount = negativeKeywordsData?.totalCount || 0;

const totalKeywordsCount = positiveKeywordsCount + negativeKeywordsCount;

const myReviews = myReviewsData?.reviews || [];

return (
<>
<section>
<div className="mb-200">
<div className="flex items-center gap-100">
<div className="font-designer-20b text-text-default">받은 평가</div>
<div className="font-designer-20b text-text-default">
{totalKeywordsCount}
</div>
</div>

<span className="font-designer-14r text-text-subtle">
개선이 필요한 점은 나에게만 보여요
</span>
</div>

<div className="mb-400 grid grid-cols-2 gap-300">
<div className="rounded-100 border-border-subtle min-h-[280px] border p-200">
<div className="mb-200 flex justify-between">
<h3 className="font-designer-16b text-text-default">좋았던 점</h3>

{positiveKeywords.length > 5 && (
<button className="font-designer-12m text-text-subtlest cursor-pointer">
더보기
</button>
)}
</div>

<ul className="flex flex-col gap-50">
{positiveKeywords.length > 0 ? (
positiveKeywords.map((keyword) => (
<KeywordReview
key={keyword.id}
content={keyword.content}
count={keyword.count}
/>
))
) : (
<span className="text-text-subtle font-designer-14r text-center">
아직 받은 평가가 없습니다.
</span>
)}
</ul>
</div>

<div className="rounded-100 border-border-subtle min-h-[280px] border p-200">
<div className="mb-200 flex justify-between">
<h3 className="font-designer-16b text-text-default">
개선이 필요한 점
</h3>

{negativeKeywords.length > 5 && (
<button className="font-designer-12m text-text-subtlest cursor-pointer">
더보기
</button>
)}
</div>

<ul className="flex flex-col gap-50">
{negativeKeywords.length > 0 ? (
negativeKeywords.map((keyword) => (
<KeywordReview
key={keyword.id}
content={keyword.content}
count={keyword.count}
/>
))
) : (
<span className="text-text-subtle font-designer-14r text-center">
아직 받은 평가가 없습니다.
</span>
)}
</ul>
</div>
</div>
</section>

<section>
<div className="flex items-center gap-100">
<div className="font-designer-20b text-text-default">후기</div>
<div className="font-designer-20b text-text-default">
{myReviewsData?.totalCount || 0}
</div>
</div>

<span className="font-designer-14r text-text-subtle">
모든 후기는 나에게만 보여요
</span>

<ul>
{myReviews.length > 0 ? (
myReviews.map((review) => <Review key={review.id} data={review} />)
) : (
<div className="text-text-subtle font-designer-14r flex h-[200px] items-center justify-center text-center">
아직까지 받은 후기가 없습니다.
</div>
)}

{hasNextPage && (
<button
className="font-designer-14m text-text-subtle hover:bg-background-accent-gray-default rounded-50 flex w-full cursor-pointer items-center justify-center py-200"
onClick={() => fetchNextPage()}
>
<span>더보기</span>

<Image
src="/icons/arrow-down.svg"
width={20}
height={20}
alt="후기 더보기"
/>
</button>
)}
</ul>
</section>
</>
);
}

function Review({ data }: { data: MyReviewItem }) {
const [expanded, setExpanded] = useState(false);

return (
<li className="border-b-border-subtle flex flex-col gap-150 border-b py-250">
<div className="flex items-center gap-150">
<Image
src={data.writer.profileImageUrl || '/profile-default.svg'}
width={32}
height={32}
alt={`${data.writer.memberName} 프로필 이미지`}
className="rounded-full"
/>

<div>
<span className="font-designer-14b text-text-default mr-50">
{data.writer.memberName}
</span>
<span className="font-designer-14r text-text-subtle mr-50">·</span>
<span className="font-designer-14r text-text-subtle">
{formatKoreaRelativeTime(data.reviewedAt)}
</span>
</div>
</div>

<div>
<p
className={`text-text-default font-designer-15r ${expanded ? 'line-clamp-none' : 'line-clamp-3'}`}
>
{data.content}
</p>
<button
className="font-designer-14r text-text-subtlest cursor-pointer"
onClick={() => setExpanded(!expanded)}
>
{expanded ? '접기' : '더보기'}
</button>
</div>

<div>
<div className="text-text-subtle">
<span className="font-designer-14b mr-100">스터디 기간</span>
<span className="font-designer-13r">
{data.startDate.replace(/-/g, '.')} ~{' '}
{data.endDate.replace(/-/g, '.')}
</span>
</div>
<div className="text-text-subtle">
<span className="font-designer-14b mr-100">스터디 주제</span>
<span className="font-designer-13r">
{data.studySubjects.join(', ')}
</span>
</div>
</div>
</li>
);
}
8 changes: 8 additions & 0 deletions app/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,10 @@ https://velog.io/@oneook/tailwindcss-4.0-%EB%AC%B4%EC%97%87%EC%9D%B4-%EB%8B%AC%E
--color-background-brand-default: var(--color-rose-500);
--color-background-brand-strong: var(--color-rose-700);

--color-background-neutral-subtle: var(--color-gray-200);
--color-background-neutral-default: var(--color-gray-500);
--color-background-neutral-strong: var(--color-gray-900);
Comment on lines +195 to +197
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이것들은 혹시 새로 디자인 시스템에 추가된 건가요??
만약 이번에 추가된 게 아니라 원래 있던 건데 등록되어 있지 않았던거라면, 디자인 시스템도 나중에 한 번 쭉 수정해야 하긴 해야겠네요....😥

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

원래 디자인에는 있었는데, 이 파일에 없어서 추가했습니다!


--color-background-accent-blue-subtle: var(--color-blue-50);
--color-background-accent-blue-default: var(--color-blue-100);
--color-background-accent-blue-strong: var(--color-blue-600);
Expand Down Expand Up @@ -226,6 +230,10 @@ https://velog.io/@oneook/tailwindcss-4.0-%EB%AC%B4%EC%97%87%EC%9D%B4-%EB%8B%AC%E
--color-background-accent-yellow-default: var(--color-yellow-100);
--color-background-accent-yellow-strong: var(--color-yellow-600);

--color-background-success-subtle: var(--color-green-300);
--color-background-success-default: var(--color-green-500);
--color-background-success-strong: var(--color-green-700);

--color-fill-brand-default-default: var(--color-rose-500);
--color-fill-brand-default-hover: var(--color-rose-600);
--color-fill-brand-default-pressed: var(--color-rose-700);
Expand Down
5 changes: 5 additions & 0 deletions next.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ const nextConfig: NextConfig = {
hostname: 'test-api.zeroone.it.kr',
pathname: '/profile-image/**',
},
{
protocol: 'https',
hostname: 'api.zeroone.it.kr',
pathname: '/profile-image/**',
},
{
protocol: 'https',
hostname: 'lh3.googleusercontent.com',
Expand Down
9 changes: 9 additions & 0 deletions public/apply-study.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions public/feedback.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions public/icons/arrow-down.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions public/icons/fine-review.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions public/icons/good-review.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions public/icons/shame-review.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions public/icons/shape.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed public/images/start-study.png
Binary file not shown.
14 changes: 14 additions & 0 deletions src/entities/user/ui/keyword-review.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
export default function KeywordReview({
content,
count,
}: {
content: string;
count: number;
}) {
return (
<li className="bg-background-accent-gray-default text-text-default rounded-50 flex justify-between px-200 py-100">
<span className="font-designer-14r">{content}</span>
<span className="font-designer-14b">{count}</span>
</li>
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ interface Props {
export default function ProfileInfoCard({ title, content }: Props) {
return (
<div className="rounded-75 bg-background-alternative flex gap-400 p-250">
<div className="font-designer-16b text-text-default w-1/5 shrink-0">
<div className="font-designer-16b text-text-default w-[132px] shrink-0">
{title}
</div>
<div className="font-designer-15r text-text-default flex-1">
Expand Down
51 changes: 42 additions & 9 deletions src/entities/user/ui/user-profile-modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,16 @@

import { XIcon } from 'lucide-react';
import { useUserProfileQuery } from '@/entities/user/model/use-user-profile-query';
import KeywordReview from '@/entities/user/ui/keyword-review';
import ProfileInfoCard from '@/entities/user/ui/profile-info-card';
import CakeIcon from '@/features/my-page/ui/icon/cake.svg';
import GithubIcon from '@/features/my-page/ui/icon/github-logo.svg';
import GlobeIcon from '@/features/my-page/ui/icon/globe-simple.svg';
import PhoneIcon from '@/features/my-page/ui/icon/phone.svg';
import { useUserPositiveKeywordsQuery } from '@/features/study/model/use-review-query';
import UserAvatar from '@/shared/ui/avatar';
import Badge from '@/shared/ui/badge';
import { Modal } from '@/shared/ui/modal';
import ProfileInfoCard from '@/widgets/my-page/profileinfo-card';

interface UserProfileModalProps {
memberId: number;
Expand All @@ -21,8 +23,13 @@ export default function UserProfileModal({
trigger,
}: UserProfileModalProps) {
const { data: profile, isLoading, isError } = useUserProfileQuery(memberId);
const { data: positiveKeywordsData } = useUserPositiveKeywordsQuery({
memberId,
});

if (isLoading || isError || !profile) return null;
if (isLoading || isError || !profile || !positiveKeywordsData) return null;

const positiveKeywords = positiveKeywordsData?.keywords || [];

return (
<Modal.Root>
Expand Down Expand Up @@ -71,25 +78,22 @@ export default function UserProfileModal({
<div className="flex flex-col gap-100">
<div className="font-designer-14r text-text-subtle flex items-center gap-100">
<CakeIcon width={16} height={16} />
{profile.memberProfile.birthDate ??
'생일을 입력해주세요!'}
{profile.memberProfile.birthDate ?? ''}
</div>
<div className="font-designer-14r text-text-subtle flex items-center gap-100">
<PhoneIcon width={16} height={16} />
{profile.memberProfile.tel ?? '번호를 입력해주세요!'}
{profile.memberProfile.tel ?? ''}
</div>
</div>

<div className="flex flex-col gap-100">
<div className="font-designer-14r text-text-subtle flex items-center gap-100">
<GithubIcon width={16} height={16} />
{profile.memberProfile.githubLink?.url ??
'깃허브 링크를 입력해주세요!'}
{profile.memberProfile.githubLink?.url ?? ''}
</div>
<div className="font-designer-14r text-text-subtle flex items-center gap-100">
<GlobeIcon width={16} height={16} />
{profile.memberProfile.blogOrSnsLink?.url ??
'블로그 링크를 입력해주세요!'}
{profile.memberProfile.blogOrSnsLink?.url ?? ''}
</div>
</div>
</div>
Expand Down Expand Up @@ -122,6 +126,35 @@ export default function UserProfileModal({
content={profile.memberInfo.studyPlan}
/>
</div>

<div className="bg-border-subtle h-[2px] w-full" />

<div className="flex gap-400 px-250">
<span className="font-designer-16b text-text-default w-[132px] shrink-0">
받은 평가
</span>

<div className="text-text-default font-designer-14r">
{/* todo: 기획 fix되면 수정 */}
{/* <span>n명의 유저들이 이런 점이 좋다고 했어요.</span> */}

<ul className="flex flex-col gap-100">
{positiveKeywords.length > 0 ? (
positiveKeywords.map((keyword) => (
<KeywordReview
key={keyword.id}
content={keyword.content}
count={keyword.count}
/>
))
) : (
<span className="text-text-subtle font-designer-14r">
아직 받은 평가가 없습니다.
</span>
)}
</ul>
</div>
</div>
</Modal.Body>
</Modal.Content>
</Modal.Portal>
Expand Down
2 changes: 1 addition & 1 deletion src/features/my-page/ui/profile-info.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
'use client';

import { MemberInfo } from '@/entities/user/api/types';
import ProfileInfoCard from '@/entities/user/ui/profile-info-card';
import ProfileInfoEditModal from '@/features/my-page/ui/profile-info-edit-modal';
import ProfileInfoCard from '@/widgets/my-page/profileinfo-card';

interface ProfileInfoProps {
memberId: number;
Expand Down
Loading