-
Notifications
You must be signed in to change notification settings - Fork 3
Feature/policy api #63
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
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
be11cc1
design: 가로 너비 400px 이하 반응형 텍스트 크기 수정
haeni82 296cc27
design: 권한 변경 시 회선 -> 이름 수정 및 header userInfoCard 텍스트 크기 수정
haeni82 3f1d35f
desing: container-queries 추가
haeni82 f2a9d96
design: 하드 코딩된 폰트 크기 수정
haeni82 81d13b7
design: 구성원별 정책 페이지 반응형 적용
haeni82 c307fb3
design: 반응형 적용
haeni82 d4f1f37
design: 그라데이션 버튼 수정 및 반응형 적용
haeni82 58f7746
fix: 빌드 에러 수정
haeni82 aa483b5
fix: 코드리뷰 바탕으로 수정
haeni82 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| import { useEffect, useState } from "react"; | ||
|
|
||
| // usePieChartSize.ts | ||
| export function usePieChartSize() { | ||
| const calc = () => { | ||
| const vw = window.innerWidth; | ||
| if (vw >= 1400) return { size: 320, strokeWidth: 25 }; | ||
| if (vw >= 768) | ||
| return { | ||
| size: Math.round(Math.min(vw * 0.5, 460)), | ||
| strokeWidth: Math.round(Math.min(vw * 0.04, 40)), // vw의 3%, 최대 40 | ||
| }; | ||
| return { size: 320, strokeWidth: 25 }; | ||
| }; | ||
|
|
||
| const [chart, setChart] = useState(calc); | ||
|
|
||
| useEffect(() => { | ||
| const handler = () => setChart(calc()); | ||
| window.addEventListener("resize", handler); | ||
| return () => window.removeEventListener("resize", handler); | ||
| }, []); | ||
|
|
||
| return chart; | ||
| } | ||
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
Oops, something went wrong.
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.
SSR/하이드레이션 환경에서
window접근 시 오류 발생 가능calc함수가window.innerWidth에 직접 접근하므로, SSR 환경이나 초기 하이드레이션 단계에서ReferenceError가 발생할 수 있습니다.🛠️ 제안된 수정
const calc = () => { + if (typeof window === "undefined") return { size: 320, strokeWidth: 25 }; const vw = window.innerWidth; if (vw >= 1400) return { size: 320, strokeWidth: 25 }; if (vw >= 768) return { size: Math.round(Math.min(vw * 0.5, 460)), - strokeWidth: Math.round(Math.min(vw * 0.04, 40)), // vw의 3%, 최대 40 + strokeWidth: Math.round(Math.min(vw * 0.04, 40)), // vw의 4%, 최대 40 }; return { size: 320, strokeWidth: 25 }; };📝 Committable suggestion
🤖 Prompt for AI Agents