From 331d885d8fc776d0cb1e04b470c880c975c5576d Mon Sep 17 00:00:00 2001 From: iziz9 <46iz.us2@gmail.com> Date: Tue, 24 Oct 2023 15:52:31 +0900 Subject: [PATCH 1/6] =?UTF-8?q?Fix:=20=EB=AC=B4=ED=95=9C=EC=8A=A4=ED=81=AC?= =?UTF-8?q?=EB=A1=A4=20api=20=ED=98=B8=EC=B6=9C=20=EC=8B=A4=ED=8C=A8=20?= =?UTF-8?q?=EC=8B=9C=20=EB=AA=A8=EB=8B=AC=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hooks/useInfinityScroll.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/hooks/useInfinityScroll.tsx b/src/hooks/useInfinityScroll.tsx index ed2f265..4e5ea97 100644 --- a/src/hooks/useInfinityScroll.tsx +++ b/src/hooks/useInfinityScroll.tsx @@ -1,11 +1,13 @@ import { getMainPostList } from '@src/api/boardApi' import { useCallback, useEffect, useState } from 'react' import { useInView } from 'react-intersection-observer' +import useModal from './useModal' const useInfinityScroll = ({ payload, page, setPostList, setPage }: IInfinityScrollProps) => { const [ref, inView] = useInView() const [isLoading, setIsLoading] = useState(false) const [lastPage, setLastPage] = useState(false) + const { openModal } = useModal() const getPostList = useCallback( async (payload: IMainListPayload, page: number) => { @@ -20,7 +22,11 @@ const useInfinityScroll = ({ payload, page, setPostList, setPage }: IInfinityScr setPostList((prevList) => [...prevList, ...postData.content]) postData.last ? setLastPage(true) : setLastPage(false) } catch (error) { - alert(error) + openModal({ + isModalOpen: true, + isConfirm: false, + content: ['게시글 정보를 불러올 수 없습니다. 잠시 후 다시 시도해주세요.'], + }) } finally { setIsLoading(false) } From da0319c66566906f47da28fe5321c7f495f129b1 Mon Sep 17 00:00:00 2001 From: iziz9 <46iz.us2@gmail.com> Date: Sun, 29 Oct 2023 02:29:09 +0900 Subject: [PATCH 2/6] =?UTF-8?q?Refactor:=20meta=20description=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 25 +++++++++-------- src/components/Main/Footer.tsx | 49 +++++++++++++++++++++------------- 2 files changed, 45 insertions(+), 29 deletions(-) diff --git a/index.html b/index.html index c25f8d8..de6eee7 100644 --- a/index.html +++ b/index.html @@ -1,14 +1,17 @@ -
- - - -