From 0fd9a5d5554c0c7e3c5365e85f574bdd7520cbf2 Mon Sep 17 00:00:00 2001 From: Eugene Kim <67894159+eugene028@users.noreply.github.com> Date: Wed, 7 Aug 2024 18:14:48 +0900 Subject: [PATCH] =?UTF-8?q?[Refactor]:=20=EB=A7=88=EC=9D=B4=EB=84=88=20UI?= =?UTF-8?q?=20=EC=9D=B4=EC=8A=88=20=EC=88=98=EC=A0=95=20(#90)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: textfield 가로길이 안맞는 부분 수정 * fix: scroll 반 쯤 내려가 있는 문제 해결 --- src/components/layout/Layout.tsx | 10 ++++++++-- src/pages/SignUp.tsx | 1 + 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/components/layout/Layout.tsx b/src/components/layout/Layout.tsx index aa2a109..97817f0 100644 --- a/src/components/layout/Layout.tsx +++ b/src/components/layout/Layout.tsx @@ -4,12 +4,18 @@ import { media } from '@/styles'; import { color } from 'wowds-tokens'; import Header from '@/components/layout/Header'; import Footer from '@/components/layout/Footer'; - -import { Outlet } from 'react-router-dom'; +import { useLayoutEffect } from 'react'; +import { Outlet, useLocation } from 'react-router-dom'; import GlobalSize from '@/constants/globalSize'; import ApiErrorBoundary from '@/components/ApiErrorBoundary'; const Layout = () => { + const location = useLocation(); + + useLayoutEffect(() => { + window.scrollTo(0, 0); + }, [location]); + return ( diff --git a/src/pages/SignUp.tsx b/src/pages/SignUp.tsx index 71bf333..3c37b2b 100644 --- a/src/pages/SignUp.tsx +++ b/src/pages/SignUp.tsx @@ -188,6 +188,7 @@ export const SignUp = () => { render={({ field, fieldState }) => (