-
Notifications
You must be signed in to change notification settings - Fork 6
Fix: 리스트 생성,수정 오류 수정 #292
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Fix: 리스트 생성,수정 오류 수정 #292
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
9641c89
Fix: step2 순위뱃지, 타이틀인풋 UI 깨짐 수정
seoyoung-min 5579151
Design: ItemAccordion hr선 색상 변경
seoyoung-min baaf637
Feat: 요청 주제 클릭 시 자동 제목 입력 추가
seoyoung-min 5c4e3d8
Fix: 리스트 수정 게시 불가 오류 해결 - 의존성 제거
seoyoung-min eb04543
Chore: 불필요 코멘트 삭제
seoyoung-min 48dc82e
Chore: 불필요 주석 삭제
seoyoung-min File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| 'use client'; | ||
|
|
||
| import { useEffect } from 'react'; | ||
| import { useRouter } from 'next/navigation'; | ||
| import { useRouter, useSearchParams } from 'next/navigation'; | ||
| import { useFormContext, useWatch } from 'react-hook-form'; | ||
| import { useQuery } from '@tanstack/react-query'; | ||
|
|
||
|
|
@@ -31,6 +31,7 @@ interface StepOneProps { | |
| export default function StepOne({ onNextClick, type }: StepOneProps) { | ||
| const { language } = useLanguage(); | ||
| const router = useRouter(); | ||
| const searchParams = useSearchParams(); | ||
|
|
||
| /** 데이터 가져오기 */ | ||
| //--- 카테고리 가져오기 | ||
|
|
@@ -65,10 +66,22 @@ export default function StepOne({ onNextClick, type }: StepOneProps) { | |
| useEffect(() => { | ||
| //카테고리 규칙 추가 | ||
| register('category', listCategoryRules); | ||
| //페이지 로드 시 'title', 'category'필 드 유효성 검사 강제 실행 | ||
| //페이지 로드 시 'title', 'category'필드 유효성 검사 강제 실행 | ||
| trigger(['title', 'category']); | ||
| }, [trigger, register, watchTitle]); | ||
|
|
||
| useEffect(() => { | ||
| //---주소에서 title, category 가져오기 | ||
| const title = searchParams?.get('title'); | ||
| const category = searchParams?.get('category'); | ||
| /**TODO: 리스트 상세 '이 타이틀로 리스트 생성에도 encode단계 넣어주기 */ | ||
|
|
||
| if (title) setValue('title', title); | ||
| if (category) { | ||
| setValue('category', categories?.find((c) => c.korName === category)?.engName); | ||
| } | ||
| }, [searchParams, categories]); | ||
|
|
||
| return ( | ||
|
Comment on lines
+73
to
85
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 서영님, 궁금한 점이 있습니다!
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @ParkSohyunee 원래는 말씀해주신 decodeURIComponent 사용해 받으려고 했는데, 인코딩 단계만 추가해주니 디코딩 단계 없이도 충분히 잘 인식이 되더라고요!! 그래서 따로 추가하지는 않았습니다~! |
||
| <div className={styles.page}> | ||
| <Header | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍👍