From 3f3b0ac6155ee3a0f497a8e45439079c39cb8bf9 Mon Sep 17 00:00:00 2001 From: y0unj1NoH Date: Mon, 9 Dec 2024 11:25:17 +0900 Subject: [PATCH] =?UTF-8?q?chore:=20=EC=9E=84=EC=8B=9C=20=EB=A8=B8?= =?UTF-8?q?=EC=A7=80=20(=EC=97=90=EB=9F=AC=20=EB=AF=B8=EC=88=98=EC=A0=95)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/HomePage.tsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/pages/HomePage.tsx b/src/pages/HomePage.tsx index ca5d01e7..f6c90ca8 100644 --- a/src/pages/HomePage.tsx +++ b/src/pages/HomePage.tsx @@ -2,10 +2,10 @@ import { useQuery } from "@tanstack/react-query"; import { Loading } from "components/molecules/Loading"; import { IPost } from "components/organisms/PostList"; import { HomeTemplate } from "components/templates"; -import { useEffect } from "react"; +import { useEffect, useCallback } from "react"; import { useNavigate } from "react-router-dom"; import { http } from "services/api"; -import { useHeaderStore, useUserStore, useFormDataStore } from "stores"; +import { useHeaderStore, useUserStore } from "stores"; import { IResponse } from "types"; interface IHomePost { myLocation: string; @@ -31,7 +31,7 @@ export const HomePage = () => { const HOME_API_URL = `/products`; const HOME_NAVIGATE_URL = "/product"; const navigate = useNavigate(); - const { clear } = useFormDataStore(); + // const { clear } = useFormDataStore(); /** 백엔드 IHomePost 타입을 프론트 IPost 으로 변환 함수 * @param homePost : IHomePost @@ -103,9 +103,10 @@ export const HomePage = () => { * @returns void */ const onHandleRegisterButton = () => { - clear(); + // clear(); navigate(HOME_NAVIGATE_URL); }; + const loadingMsg = "사용자 주변 게시글\n불러오는 중..."; if (isLoading) {