Skip to content

Commit

Permalink
Merge pull request #230 from SOPT-all/fix/#227/onboarding-ga
Browse files Browse the repository at this point in the history
[FIX] 온보딩 하단 버튼 위치 조정
  • Loading branch information
bykbyk0401 authored Jan 24, 2025
2 parents bb724e7 + c8d9868 commit 7725fb5
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
14 changes: 14 additions & 0 deletions src/pages/onboardingPage/OnboardingPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,20 @@ const OnboardingPage = () => {

const { data, isLoading } = useGetNickname(userId);
const [isInitialLoad, setIsInitialLoad] = useState<boolean>(true);
const setVh = () => {
const vh = window.innerHeight * 0.01;
document.documentElement.style.setProperty('--vh', `${vh}px`);
};

useEffect(() => {
setVh();
window.addEventListener('resize', setVh);

return () => {
window.removeEventListener('resize', setVh);
};
}, []);

useEffect(() => {
if (isInitialLoad) {
setSelections((prev) => ({
Expand Down
2 changes: 1 addition & 1 deletion src/pages/onboardingPage/onboardingPage.css.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { style } from '@vanilla-extract/css';

const container = style({
height: '100vh',
height: 'calc(var(--vh, 1vh) * 100)',
display: 'grid',
gridTemplateRows: 'auto 1fr',
});
Expand Down

0 comments on commit 7725fb5

Please sign in to comment.