diff --git a/src/App.tsx b/src/App.tsx index ea01761..5e305ec 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -17,96 +17,94 @@ import ErrorPage from './pages/ErrorPage'; function App() { return ( -
- - - -
- - } - /> - - - - } - /> - - - - } - /> - - - - } - /> - - - - } - /> - - - - } - /> - - - - } - /> - } /> - } /> - } /> - - - - } - /> - - - - } - /> - - - - } - /> - } /> - - -
+ + + +
+ + } + /> + + + + } + /> + + + + } + /> + + + + } + /> + + + + } + /> + + + + } + /> + + + + } + /> + } /> + } /> + } /> + + + + } + /> + + + + } + /> + + + + } + /> + } /> + + ); } diff --git a/src/apis/user/getRegions.ts b/src/apis/user/getRegions.ts index 53db69e..d4d3e6e 100644 --- a/src/apis/user/getRegions.ts +++ b/src/apis/user/getRegions.ts @@ -2,6 +2,10 @@ import { baseAxios } from '@/libs/baseAxios.ts'; import { regions } from '@/mocks/mockDatas/regions.ts'; export const getRegions = async (query: string) => { + if (query === '') { + return []; + } + const response = await baseAxios(`/region?name=${query}`); return response.data; diff --git a/src/components/register/RegionList.tsx b/src/components/register/RegionList.tsx index af8be74..d34bb9d 100644 --- a/src/components/register/RegionList.tsx +++ b/src/components/register/RegionList.tsx @@ -24,7 +24,7 @@ export const RegionList = ({ onSelectLocation, search }: RegionListProps) => { }, [search, debouncedUpdateSearch]); return ( -
    +
      {locationList.map((location) => (
    • setSearch('')} /> - +
      +
      } >
      - { return ( diff --git a/src/pages/RegisterPage.tsx b/src/pages/RegisterPage.tsx index bfeea7f..f74d12f 100644 --- a/src/pages/RegisterPage.tsx +++ b/src/pages/RegisterPage.tsx @@ -10,6 +10,7 @@ import useInternalRouter from '@/hooks/useInternalRouter.ts'; import { ONE_DAY } from '@/constants/day.ts'; import { useCookies } from 'react-cookie'; import LoadingScreen from '@/components/common/LoadingScreen'; +import useToast from '@/hooks/useToast.tsx'; type RegisterForm = { nickname: string; @@ -24,6 +25,7 @@ const RegisterPage = () => { location: '', locationId: undefined, }); + const { openToast } = useToast(); const [step, setStep] = useState< '닉네임입력' | '주소입력' | '알림시간대입력' | '완료하기' | '로딩' @@ -57,7 +59,13 @@ const RegisterPage = () => { }); }, onError: () => { - // TODO: 에러 퍼널 보여주기 + openToast({ + message: ( +

      + 회원가입에 실패했습니다. 다시 시도해주세요. +

      + ), + }); }, }, );