-
Notifications
You must be signed in to change notification settings - Fork 1
[FEAT] 모바일 반응형 #81
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
[FEAT] 모바일 반응형 #81
Changes from all commits
9c5e9cd
fd50aa1
90a8303
0e79def
95d9d68
fbd33b5
c3c79fa
7f6eba7
b457a73
4c83560
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -23,7 +23,7 @@ export const Landing = ({ onNext, onHomeClick }: LinkFormProps) => { | |||||
| <Body1>핀디와 함께, 특별한 순간을 찾아보세요</Body1> | ||||||
| </div> | ||||||
| <div className="absolute bottom-3 w-full max-w-[30rem] px-4 mb-5"> | ||||||
| <Button variant="primary" size="large" onClick={() => onNext} className="w-full"> | ||||||
| <Button variant="primary" size="large" onClick={() => onNext()} className="w-full"> | ||||||
|
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. 🛠️ Refactor suggestion onClick 핸들러 최적화 필요 불필요한 화살표 함수 래퍼를 제거하여 성능을 개선할 수 있습니다. 매개변수가 필요하지 않으므로 함수 참조를 직접 전달하는 것이 좋습니다. 다음과 같이 수정하는 것을 추천드립니다: 📝 Committable suggestion
Suggested change
|
||||||
| 다음 | ||||||
| </Button> | ||||||
| </div> | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -33,9 +33,10 @@ export const MapView = () => { | |||||||||||||||||||||||||||||||||
| const [isInputDisabled, setIsInputDisabled] = useState(false); | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| const handleDataUpdate = useCallback( | ||||||||||||||||||||||||||||||||||
| (newData: Place[], type: BottomSheetType) => { | ||||||||||||||||||||||||||||||||||
| (newData: ExtractResponse | Place[], type: BottomSheetType) => { | ||||||||||||||||||||||||||||||||||
| clearMarkers(); | ||||||||||||||||||||||||||||||||||
| newData?.forEach(addMarker); | ||||||||||||||||||||||||||||||||||
| if ('places' in newData) newData.places.forEach(addMarker); | ||||||||||||||||||||||||||||||||||
| if (Array.isArray(newData)) newData.forEach((place) => addMarker(place)); | ||||||||||||||||||||||||||||||||||
| setState({ data: newData, type }, token); | ||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||
|
Comment on lines
+36
to
41
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. 🛠️ Refactor suggestion 타입 처리 로직 개선이 필요합니다. 타입 가드를 사용하여 더 안전하게 타입을 처리할 수 있습니다. 현재 구현은 런타임 에러가 발생할 수 있습니다. 다음과 같이 개선하는 것을 제안합니다: 📝 Committable suggestion
Suggested change
|
||||||||||||||||||||||||||||||||||
| [clearMarkers, addMarker, setState, token] | ||||||||||||||||||||||||||||||||||
|
|
@@ -44,7 +45,7 @@ export const MapView = () => { | |||||||||||||||||||||||||||||||||
| useEffect(() => { | ||||||||||||||||||||||||||||||||||
| const extractedData = location.state?.data; | ||||||||||||||||||||||||||||||||||
| if (extractedData?.places.length) { | ||||||||||||||||||||||||||||||||||
| handleDataUpdate(extractedData.places, 'extract'); | ||||||||||||||||||||||||||||||||||
| handleDataUpdate(extractedData, 'extract'); | ||||||||||||||||||||||||||||||||||
|
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. 데이터 유효성 검사가 필요합니다.
다음과 같이 수정하는 것을 제안합니다: 📝 Committable suggestion
Suggested change
|
||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||
| }, [handleDataUpdate, location.state, setState, token]); | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -28,6 +28,9 @@ export default { | |
| zIndex: { | ||
| modal: '100', | ||
| }, | ||
| screens: { | ||
| xs: '450px', | ||
| }, | ||
| }, | ||
| }, | ||
| plugins: [], | ||
|
|
||
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.
💡 Codebase verification
모바일 대응을 위한 레이아웃 개선이 필요합니다.
코드 분석 결과, 다음과 같은 사항들이 확인되었습니다:
min-w-7로 최소 너비가 지정되어 있어 긴 텍스트의 경우 모바일에서 레이아웃 문제가 발생할 수 있습니다gap-3으로 고정되어 있어 모바일 화면에서 유연하지 않습니다제안된 수정사항:
이 변경으로:
flex-wrap으로 긴 카테고리명이 있을 경우 자연스럽게 줄바꿈🔗 Analysis chain
카테고리 칩의 모바일 대응이 필요해 보입니다.
긴 카테고리명이 있을 경우 모바일 화면에서 레이아웃이 깨질 수 있습니다. 다음과 같은 개선을 제안드립니다:
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
Length of output: 54
Script:
Length of output: 274
Script:
Length of output: 8333
Script:
Length of output: 1356
Script:
Length of output: 2486
Script:
Length of output: 303
Script:
Length of output: 453
Script:
Length of output: 1022