diff --git a/src/app/(user)/users/[id]/groups/created/page.tsx b/src/app/(user)/users/[id]/groups/created/page.tsx index d0d59954..0ad0b757 100644 --- a/src/app/(user)/users/[id]/groups/created/page.tsx +++ b/src/app/(user)/users/[id]/groups/created/page.tsx @@ -20,12 +20,12 @@ type CreatedGroupsPageWrapperProps = { } type CreatedGroupsPageProps = { - params: Promise<{ id: string }>; - searchParams: Promise<{ + params: { id: string }; + searchParams: { search: string; type: string; order: string; - }>; + }; }; /** @@ -37,11 +37,13 @@ export default async function CreatedGroupsPageWrapper({ params, searchParams, }: CreatedGroupsPageWrapperProps) { + const awaitedSearchParams = await searchParams; + const awaitedParams = await params; return ( - } key={JSON.stringify(searchParams)}> + } key={JSON.stringify(awaitedSearchParams)}> ) @@ -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(); diff --git a/src/app/(user)/users/[id]/groups/ended/page.tsx b/src/app/(user)/users/[id]/groups/ended/page.tsx index b619256a..286c8b22 100644 --- a/src/app/(user)/users/[id]/groups/ended/page.tsx +++ b/src/app/(user)/users/[id]/groups/ended/page.tsx @@ -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 ( } - key={JSON.stringify(searchParams)} + key={JSON.stringify(awaitedSearchParams)} > - + ); } @@ -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(); diff --git a/src/app/bookmark/BookmarkPageClient.tsx b/src/app/bookmark/BookmarkPageClient.tsx index ab779621..4caadc0e 100644 --- a/src/app/bookmark/BookmarkPageClient.tsx +++ b/src/app/bookmark/BookmarkPageClient.tsx @@ -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) => { @@ -117,7 +117,7 @@ export function BookmarkPageClient() { ) : ( <> diff --git a/src/components/molecules/write-form/selectSkill.tsx b/src/components/molecules/write-form/selectSkill.tsx index e88b0e62..ef192458 100644 --- a/src/components/molecules/write-form/selectSkill.tsx +++ b/src/components/molecules/write-form/selectSkill.tsx @@ -60,6 +60,7 @@ export const SelectSkill = ({ form }: SelectSkillProps) => { : 'border-none outline-none', )} aria-hidden="true" + value={field.value ?? ''} /> diff --git a/src/components/molecules/write-form/tiptap/desctiption.tsx b/src/components/molecules/write-form/tiptap/desctiption.tsx index ba8bf75b..c445888f 100644 --- a/src/components/molecules/write-form/tiptap/desctiption.tsx +++ b/src/components/molecules/write-form/tiptap/desctiption.tsx @@ -101,7 +101,7 @@ export const Description = ({ form }: DescriptionProps) => { editorProps: { attributes: { class: clsx( - 'h-[500px] w-full mt-0 py-2 px-3 text-sm rounded-md border border-input bg-background ring-offset-background shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px]', + 'h-[500px] overflow-y-auto w-full mt-0 py-2 px-3 text-sm rounded-md border border-input bg-background ring-offset-background shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px]', hasError ? 'text-red-500 border-red-500 focus-visible:ring-red-500/20' : 'focus-visible:border-ring focus-visible:ring-ring/50', diff --git a/src/components/organisms/write-form/index.tsx b/src/components/organisms/write-form/index.tsx index f8db7726..d5cee5af 100644 --- a/src/components/organisms/write-form/index.tsx +++ b/src/components/organisms/write-form/index.tsx @@ -38,8 +38,8 @@ const formSchema = z .string() .trim() .nonempty({ message: '제목을 입력해주세요.' }) - .max(30, { - message: '제목이 너무 길어요. 30자 이내로 줄여주세요.', + .max(100, { + message: '제목이 너무 길어요. 100자 이내로 줄여주세요.', }), maxParticipants: z.coerce .number({ message: '모임의 정원을 설정해주세요.' }) @@ -87,11 +87,7 @@ const formSchema = z path: ['endDate'], }); -type WriteFormProps = { - userId: number; -}; - -export const WriteForm = ({ userId }: WriteFormProps) => { +export const WriteForm = () => { const [isDeadlineCalendarOpen, setIsDeadlineCalendarOpen] = useState(false); const [isStartDateCalendarOpen, setIsStartDateCalendarOpen] = useState(false); const [isEndDateCalendarOpen, setIsEndDateCalendarOpen] = useState(false); @@ -120,7 +116,6 @@ export const WriteForm = ({ userId }: WriteFormProps) => { reValidateMode: 'onSubmit', // submit 시에만 유효성 검사 defaultValues: { title: '', - maxParticipants: 2, description: '', autoAllow: false, type: GroupType.STUDY, @@ -145,7 +140,7 @@ export const WriteForm = ({ userId }: WriteFormProps) => { try { const result = await request.post( - `/v2/groups?userId=${userId}`, + `/v2/groups`, { 'Content-Type': 'application/json' }, JSON.stringify({ ...values, skills, position }), { credentials: 'include' }, diff --git a/src/features/group/components/participant-list-modal.tsx b/src/features/group/components/participant-list-modal.tsx index 55f1864b..300b5de8 100644 --- a/src/features/group/components/participant-list-modal.tsx +++ b/src/features/group/components/participant-list-modal.tsx @@ -35,22 +35,6 @@ export const ParticipantListModal = ({