From e4ece47fd871e283e752fb475a28d4be827cc7ec Mon Sep 17 00:00:00 2001 From: Jungwoo Hong Date: Thu, 5 Dec 2024 00:03:07 +0900 Subject: [PATCH] =?UTF-8?q?refactor:=20Suggest=20ErrorBoundary=20=EC=84=A4?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/src/app/components/cabinet/CabinetContainer.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/client/src/app/components/cabinet/CabinetContainer.tsx b/client/src/app/components/cabinet/CabinetContainer.tsx index 6f82370..d61f91a 100644 --- a/client/src/app/components/cabinet/CabinetContainer.tsx +++ b/client/src/app/components/cabinet/CabinetContainer.tsx @@ -10,6 +10,7 @@ import { Broadcast } from '@libs/internalTypes'; import { getSuggestedLiveList } from '@libs/actions'; import useFollowingLives from '@hooks/useFollowingLives'; import useUser from '@hooks/useUser'; +import ErrorBoundary from '@components/ErrorBoundary'; const CabinetContainer = () => { const { isLoggedin } = useUser(); @@ -18,7 +19,9 @@ const CabinetContainer = () => {
{isLoggedin && } - + + +
); }; @@ -88,7 +91,7 @@ const SuggestedNavigator = () => { }, []); const filteredSuggestedList = useMemo(() => { - return suggestedList.filter((suggested) => !ids.includes(suggested.broadcastId)); + return suggestedList?.filter((suggested) => !ids.includes(suggested.broadcastId)) || []; }, [suggestedList, ids]); return (