Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
0f3ca2b
design: 만들기 버튼 영역 수정
e-sum-e Jun 23, 2025
e468df2
fix: 제목 최대 길이 수정(30->100)
e-sum-e Jun 23, 2025
ba4cb82
fix: 모집 정원을 자유롭게 입력하되 범위를 벗어날 경우 보정해주고 툴팁이 보이도록 수정
e-sum-e Jun 23, 2025
a83ea2a
feat: maxFileSize 디폴트 값 수정
rlarkdals1202 Jun 23, 2025
4554c43
feat: 서버에서 응답하는 메시지를 알리도록 변경
rlarkdals1202 Jun 23, 2025
b927009
feat: 쿼리 gcTime 옵션 추가
rlarkdals1202 Jun 23, 2025
26b110a
feat: 'Skills'와 'E-mail' 텍스트 수정
rlarkdals1202 Jun 23, 2025
f4cd186
fix: 내용이 길어지는 경우 스크롤
e-sum-e Jun 23, 2025
087960f
fix: 불필요 props 삭제
e-sum-e Jun 23, 2025
e5772e4
feat: 'refresh 만료' 메시지를 포함한 인증 에러 처리 추가
rlarkdals1202 Jun 23, 2025
0f8db42
fix: 참가 인원이 모두 채워진 경우 모집 종료 커버 씌워줌
e-sum-e Jun 23, 2025
0e5e48d
fix: 북마크 페이지 필터링 수정 및 items 대신 bookmarkItems로 변경
Yuna-001 Jun 23, 2025
483129c
fix: 같은 참여자가 3번씩 보이는 문제 해결
Yuna-001 Jun 23, 2025
d5c6bd4
Merge pull request #250 from moyeora-it/fix-sm
e-sum-e Jun 23, 2025
76093ed
Merge pull request #251 from moyeora-it/fix-my-page
e-sum-e Jun 23, 2025
d20d718
fix: filter content 영역이 그룹카드 위로 올라오도록 수정
e-sum-e Jun 23, 2025
c0c1338
fix: 공유하기 버튼 클릭 함수에서 url을 가져오도록 하여 현재 주소를 제대로 반영하도록 수정
Yuna-001 Jun 23, 2025
602f3d8
fix: 개발자모드 에러 수정
e-sum-e Jun 23, 2025
e14c19a
rename: 불필요 코드 삭제
e-sum-e Jun 23, 2025
925e1fc
feat: 모임 목록 조회 기능 일부 변경
rlarkdals1202 Jun 23, 2025
5941bb1
design: UI 깨지는 현상 수정
rlarkdals1202 Jun 23, 2025
cc1e674
feat: 신청자, 참여자 목록 로딩 컴포넌트 추가
rlarkdals1202 Jun 23, 2025
d777901
feat: 신청자 목록 로딩 UI 추가
rlarkdals1202 Jun 23, 2025
d5e2f98
feat: 참가자 목록 로딩 UI 추가
rlarkdals1202 Jun 23, 2025
ed5612d
fix: 정원의 툴팁이 보이도록 isTooltipOpen이 true일 경우에만 props로 내려지도록 수정
e-sum-e Jun 23, 2025
7c3c8dd
fix: 댓글 스크롤 훅에서 대댓글인 경우에도 쿼리 파라미터에서 replyId 삭제하도록 수정
Yuna-001 Jun 23, 2025
c92eb31
Merge pull request #258 from moyeora-it/fix-my-page
rlarkdals1202 Jun 23, 2025
84fbafc
fix: Page props 타입 변경 및 await 키워드 사용
rlarkdals1202 Jun 23, 2025
459086a
Merge pull request #262 from moyeora-it/fix-ya
Yuna-001 Jun 23, 2025
95c0e8e
feature: 댓글 수정 취소 기능 추가
Yuna-001 Jun 23, 2025
2c829d5
Merge pull request #266 from moyeora-it/fix-sm
e-sum-e Jun 23, 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
18 changes: 10 additions & 8 deletions src/app/(user)/users/[id]/groups/created/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ type CreatedGroupsPageWrapperProps = {
}

type CreatedGroupsPageProps = {
params: Promise<{ id: string }>;
searchParams: Promise<{
params: { id: string };
searchParams: {
search: string;
type: string;
order: string;
}>;
};
};

/**
Expand All @@ -37,11 +37,13 @@ export default async function CreatedGroupsPageWrapper({
params,
searchParams,
}: CreatedGroupsPageWrapperProps) {
const awaitedSearchParams = await searchParams;
const awaitedParams = await params;
return (
<Suspense fallback={<GroupListLoading />} key={JSON.stringify(searchParams)}>
<Suspense fallback={<GroupListLoading />} key={JSON.stringify(awaitedSearchParams)}>
<CreatedGroupsPage
params={params}
searchParams={searchParams}
params={awaitedParams}
searchParams={awaitedSearchParams}
/>
</Suspense>
)
Expand All @@ -51,9 +53,9 @@ const CreatedGroupsPage = async ({
params,
searchParams,
}: CreatedGroupsPageProps) => {
const { search, type, order } = await searchParams;
const { search, type, order } = searchParams;

const { id } = await params;
const { id } = params;

const cookieHeaderValue = await getAuthCookieHeader();

Expand Down
16 changes: 9 additions & 7 deletions src/app/(user)/users/[id]/groups/ended/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,25 @@ type EndedGroupsPageWrapperProps = {
};

type EndedGroupsPageProps = {
params: Promise<{ id: string }>;
searchParams: Promise<{
params: { id: string };
searchParams: {
search: string;
type: string;
}>;
};
};

export default async function EndedGroupsPageWrapper({
params,
searchParams,
}: EndedGroupsPageWrapperProps) {
const awaitedSearchParams = await searchParams;
const awaitedParams = await params;
return (
<Suspense
fallback={<GroupListLoading />}
key={JSON.stringify(searchParams)}
key={JSON.stringify(awaitedSearchParams)}
>
<EndedGroupsPage params={params} searchParams={searchParams} />
<EndedGroupsPage params={awaitedParams} searchParams={awaitedSearchParams} />
</Suspense>
);
}
Expand All @@ -45,9 +47,9 @@ const EndedGroupsPage = async ({
params,
searchParams,
}: EndedGroupsPageProps) => {
const { id } = await params;
const { id } = params;

const { search, type } = await searchParams;
const { search, type } = searchParams;

const queryClient = new QueryClient();

Expand Down
4 changes: 2 additions & 2 deletions src/app/bookmark/BookmarkPageClient.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export function BookmarkPageClient() {
});

const items = flattenPages(data.pages);
const bookmarkItems = items.filter((item) => !item.isBookmark);
const bookmarkItems = items.filter((item) => item.isBookmark);

// 탭 변경 핸들러
const handleValueChange = (value: GroupType) => {
Expand Down Expand Up @@ -117,7 +117,7 @@ export function BookmarkPageClient() {
) : (
<>
<ul className="grid mt-8 gap-4 md:grid-cols-2 xl:grid-cols-4">
{items.map((group) => (
{bookmarkItems.map((group) => (
<li key={group.id}>
<GroupCard item={group} />
</li>
Expand Down
4 changes: 2 additions & 2 deletions src/app/write/page.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
'use client';

import { WriteForm } from '@/components/organisms/write-form';
import useIsClient from '@/hooks/useIsClient';
import useAuthStore from '@/stores/useAuthStore';
import { routes } from '@/utils/routes';
import { useRouter } from 'next/navigation';
import { useEffect } from 'react';
import useIsClient from '@/hooks/useIsClient';

export default function Page() {
const user = useAuthStore((state) => state.user);
Expand Down Expand Up @@ -34,7 +34,7 @@ export default function Page() {

return (
<div className="relative w-[300px] sm:w-[370px] md:w-[740px] m-auto mb-10">
<WriteForm userId={user.userId} />
<WriteForm />
</div>
);
}
6 changes: 3 additions & 3 deletions src/components/atoms/share-button/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import { Button } from '@/components/ui/button';
import { toast } from 'sonner';

export const ShareButton = () => {
const currentUrl = window.location.href;

const shareButtonClickHandler = async () => {
const currentUrl = window.location.href;

try {
await navigator.clipboard.writeText(currentUrl);
await navigator.clipboard.writeText(`${currentUrl}`);
toast.success('링크가 복사되었습니다.');
} catch {
toast.error('링크 복사에 실패하였습니다.');
Expand Down
4 changes: 3 additions & 1 deletion src/components/atoms/write-form/form-label.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,15 @@ type WriteFormLabelProps = {
text: string;
className?: string;
info?: string;
isTooltipOpen?: boolean;
};

export const WriteFormLabel = ({
htmlFor,
text,
className,
info,
isTooltipOpen,
}: WriteFormLabelProps) => {
return (
<div className="flex gap-1">
Expand All @@ -28,7 +30,7 @@ export const WriteFormLabel = ({
{text}
</FormLabel>
{info && (
<Tooltip>
<Tooltip {...(isTooltipOpen ? { open: true } : {})}>
<TooltipTrigger>
<CircleInfo />
</TooltipTrigger>
Expand Down
2 changes: 1 addition & 1 deletion src/components/error-boundary/error-handler.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const handleError = ({
}

// 인증 에러
if (error.message.includes('401') || error.message.toLowerCase().includes('unauthorized')) {
if (error.message.includes('401') || error.message.toLowerCase().includes('unauthorized') || error.message.includes('refresh 만료')) {
return (
<ErrorFallback error={error} resetErrorBoundary={resetErrorBoundary}>
로그인이 필요합니다
Expand Down
6 changes: 4 additions & 2 deletions src/components/error-fallback/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ export const ErrorFallback = ({
const handleClick = () => {
if (
error?.message.includes('401') ||
error?.message.toLowerCase().includes('unauthorized')
error?.message.toLowerCase().includes('unauthorized') ||
error?.message.toLowerCase().includes('refresh 만료')
) {
clearUser();
console.log('401 에러 발생');
Expand All @@ -54,7 +55,8 @@ export const ErrorFallback = ({
className="mt-2 text-white text-sm cursor-pointer bg-green-600"
>
{error?.message.includes('401') ||
error?.message.toLowerCase().includes('unauthorized')
error?.message.toLowerCase().includes('unauthorized') ||
error?.message.toLowerCase().includes('refresh 만료')
? '로그인하기'
: '다시 시도'}
</Button>
Expand Down
2 changes: 1 addition & 1 deletion src/components/molecules/group-create-button/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const WriteGroupButton = () => {
};

return (
<div className="fixed md:absolute bottom-0 md:top-0 right-0 my-6 z-10">
<div className="fixed md:absolute bottom-0 md:top-0 md:bottom-auto right-0 my-6 z-10">
<Button
onClick={writeButtonClickHandler}
className="cursor-pointer rounded-[50%] md:hidden"
Expand Down
4 changes: 2 additions & 2 deletions src/components/molecules/group/filter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export const Filter = ({ updateQueryParams }: FilterProps) => {
기술 스택
</Button>
</PopoverTrigger>
<PopoverContent className="flex gap-1 mt-1 p-3 bg-white ring-1 ring-gray-200 rounded-md">
<PopoverContent className="flex gap-1 mt-1 p-3 bg-white ring-1 ring-gray-200 rounded-md z-10">
<Button
variant="outline"
onClick={() => skillSelectHandler('')}
Expand Down Expand Up @@ -123,7 +123,7 @@ export const Filter = ({ updateQueryParams }: FilterProps) => {
포지션
</Button>
</PopoverTrigger>
<PopoverContent className="flex gap-1 mt-2 p-2 bg-white ring-1 ring-gray-200 rounded-md">
<PopoverContent className="flex gap-1 mt-2 p-2 bg-white ring-1 ring-gray-200 rounded-md z-10">
<Button
variant="outline"
onClick={() => positionSelectHandler('')}
Expand Down
4 changes: 3 additions & 1 deletion src/components/molecules/group/group-card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ type GroupCardProps = {

// TODO : 섹션별로 component 나누기
export const GroupCard = ({ item }: GroupCardProps) => {
const isClosed = isBeforeToday(item.deadline);
const isClosed =
isBeforeToday(item.deadline) ||
item.participants.length >= item.maxParticipants;

return (
<div className="relative p-5 h-[280px] lg:h-[316px] bg-white shadow-sm ring-2 ring-gray-300/30 rounded-xl">
Expand Down
13 changes: 11 additions & 2 deletions src/components/molecules/position-badge/index.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import { Badge } from '@/components/atoms/badge';
import {
Tooltip,
Expand Down Expand Up @@ -37,13 +39,20 @@ allPositionlKeys.forEach((position) => {

type PositionBadgeProps = {
name: string;
positionClickHandler?: (name: string) => void;
};

export const PositionBadge = ({ name }: PositionBadgeProps) => {
export const PositionBadge = ({
name,
positionClickHandler,
}: PositionBadgeProps) => {
return (
<Tooltip>
<div className="position-badge flex flex-row cursor-pointer">
<TooltipTrigger type="button">
<TooltipTrigger
type="button"
onClick={() => positionClickHandler?.(name)}
>
<Badge
text={name}
className="text-sm font-medium bg-gray-100 text-gray-600 px-1"
Expand Down
11 changes: 9 additions & 2 deletions src/components/molecules/skill-badge/index.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import {
Tooltip,
TooltipContent,
Expand All @@ -21,13 +23,18 @@ allSkillKeys.forEach((skill) => {
type SkillBadgeProps = {
name: SkillName;
isDefault?: boolean;
skillClickHandler?: (name: SkillName) => void;
};

export const SkillBadge = ({ name, isDefault = true }: SkillBadgeProps) => {
export const SkillBadge = ({
name,
isDefault = true,
skillClickHandler,
}: SkillBadgeProps) => {
return (
<Tooltip>
<div className="skill-badge flex w-full h-full flex-row border p-1 items-center justify-center rounded-full cursor-pointer">
<TooltipTrigger type="button">
<TooltipTrigger type="button" onClick={() => skillClickHandler?.(name)}>
{isDefault && (
<Image src={skillLogoMap[name]} alt="logo" width={20} height={20} />
)}
Expand Down
44 changes: 32 additions & 12 deletions src/components/molecules/write-form/maxParticipants.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,30 +7,47 @@ import {
} from '@/components/ui/form';
import { Input } from '@/components/ui/input';
import { WriteForm } from '@/types';
import { useState } from 'react';
import { useEffect, useState } from 'react';
import { UseFormReturn } from 'react-hook-form';

type TitleProps = {
form: UseFormReturn<WriteForm>;
};

export const MaxParticipants = ({ form }: TitleProps) => {
const [maxParticipants, setMaxParticipants] = useState(2);
const [isTooltipOpen, setIsTooltipOpen] = useState(false);

const inputChangeHandler = (e: React.ChangeEvent<HTMLInputElement>) => {
const inputBlurHandler = (e: React.ChangeEvent<HTMLInputElement>) => {
const value = Number(e.target.value);
if (value > 30) {
setMaxParticipants(30);
return;
}
if (value < 2) {
setMaxParticipants(2);

if (value === 0) {
// 입력값이 없거나 0이면 2로 세팅
form.setValue('maxParticipants', 2);
return;
}

setMaxParticipants(value);
if (value < 2 || value > 30) {
const settedValue = Math.max(2, Math.min(30, value));
form.setValue('maxParticipants', settedValue);

setIsTooltipOpen(true);
}
};

/**
* 정원 보정 후 툴팁이 3초뒤에 사라지게 하기
*/

useEffect(() => {
if (isTooltipOpen) {
const timer = setTimeout(() => {
setIsTooltipOpen(false);
}, 3000); // 3초

return () => clearTimeout(timer);
}
}, [isTooltipOpen]);

return (
<>
<FormField
Expand All @@ -42,6 +59,7 @@ export const MaxParticipants = ({ form }: TitleProps) => {
htmlFor="maxParticipants"
text="정원"
info="최소 2명 ~ 최대 30명까지 가능합니다"
isTooltipOpen={isTooltipOpen}
/>
<FormControl>
<Input
Expand All @@ -51,8 +69,10 @@ export const MaxParticipants = ({ form }: TitleProps) => {
placeholder="정원을 입력해주세요"
{...field}
type="number"
onChange={inputChangeHandler}
value={maxParticipants}
onBlur={(e) => {
inputBlurHandler(e);
field.onBlur();
}}
/>
</FormControl>
<FormMessage />
Expand Down
Loading