From 5690d212b9550cc2538b6da39ed63657255c477a Mon Sep 17 00:00:00 2001 From: JYKIM317 Date: Wed, 4 Dec 2024 23:45:11 +0900 Subject: [PATCH 1/4] =?UTF-8?q?fix:=20live.service=20follow=20filter=20?= =?UTF-8?q?=EA=B8=B0=EB=8A=A5=20=EC=98=A4=EB=A5=98=20=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Map으로 단언한 부분이 실제로는 Map으로 선언되지 않는 문제를 해결했습니다. --- applicationServer/src/live/live.service.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/applicationServer/src/live/live.service.ts b/applicationServer/src/live/live.service.ts index 388e1e4..e58270a 100644 --- a/applicationServer/src/live/live.service.ts +++ b/applicationServer/src/live/live.service.ts @@ -121,7 +121,6 @@ export class LiveService { this.redisService.set(`${REDIS_LIVE_KEY}${member.broadcast_id}`, JSON.stringify(memberLiveData)); } - // async notifyLiveDataInterval(broadcastId: string, req: Request) { if (!(await this.redisService.exists(`${REDIS_LIVE_KEY}${broadcastId}`))) throw new HttpException('No Content', HttpStatus.NO_CONTENT); @@ -156,9 +155,9 @@ export class LiveService { async filterWithFollow(memberId) { const live = (await this.getLiveList(0)).reduce((liveObj, thisLive) => { - liveObj[thisLive.broadcastId] = thisLive; + liveObj.set(thisLive.broadcastId, thisLive); return liveObj; - }, {}) as Map; + }, new Map()) as Map; const followList = await this.memberService.findMembersWithFollowTable(memberId); const onAir = []; const offAir = []; From 29f4855b61d8783746b8e15817a1b0e2ec9442a7 Mon Sep 17 00:00:00 2001 From: Wille Lee <1992season@gmail.com> Date: Wed, 4 Dec 2024 23:46:32 +0900 Subject: [PATCH 2/4] =?UTF-8?q?hotfix:=20filteredLives=20useMemo=20?= =?UTF-8?q?=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/app/(domain)/features/RecommendedLivesRenderer.tsx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/client/src/app/(domain)/features/RecommendedLivesRenderer.tsx b/client/src/app/(domain)/features/RecommendedLivesRenderer.tsx index 06d0dff..cf2a410 100644 --- a/client/src/app/(domain)/features/RecommendedLivesRenderer.tsx +++ b/client/src/app/(domain)/features/RecommendedLivesRenderer.tsx @@ -3,14 +3,11 @@ import Lives from '@components/livesGrid/Lives'; import type { Broadcast } from '@libs/internalTypes'; import useFollowingLives from '@hooks/useFollowingLives'; -import { useMemo } from 'react'; const RecommendedLivesRenderer = ({ lives }: { lives: Broadcast[] }) => { const { ids } = useFollowingLives(); - const filteredLives = useMemo(() => { - return lives.filter((live) => !ids.includes(live.broadcastId)); - }, [ids, lives]); + const filteredLives = lives?.filter((live) => !ids.includes(live.broadcastId)) || []; return ( From b8df62636831da38fdd49b052e5e25b461dd5d17 Mon Sep 17 00:00:00 2001 From: Jungwoo Hong Date: Thu, 5 Dec 2024 00:03:07 +0900 Subject: [PATCH 3/4] =?UTF-8?q?refactor:=20Suggest=20ErrorBoundary=20?= =?UTF-8?q?=EC=84=A4=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 ( From 65d9c23e00d7bf2d4cf02361fbce804577d4170d Mon Sep 17 00:00:00 2001 From: Wille Lee <1992season@gmail.com> Date: Thu, 5 Dec 2024 00:15:27 +0900 Subject: [PATCH 4/4] =?UTF-8?q?hotfix:=20=ED=99=88=20=EB=9D=BC=EC=9D=B4?= =?UTF-8?q?=EB=B8=8C=20=EB=AA=A9=EB=A1=9D=20length=3D0=20UI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../(domain)/features/RecommendedLivesRenderer.tsx | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/client/src/app/(domain)/features/RecommendedLivesRenderer.tsx b/client/src/app/(domain)/features/RecommendedLivesRenderer.tsx index cf2a410..3f6d8a7 100644 --- a/client/src/app/(domain)/features/RecommendedLivesRenderer.tsx +++ b/client/src/app/(domain)/features/RecommendedLivesRenderer.tsx @@ -3,12 +3,24 @@ import Lives from '@components/livesGrid/Lives'; import type { Broadcast } from '@libs/internalTypes'; import useFollowingLives from '@hooks/useFollowingLives'; +import Image from 'next/image'; +import noContents from '@assets/no_result.png'; +import clsx from 'clsx'; const RecommendedLivesRenderer = ({ lives }: { lives: Broadcast[] }) => { const { ids } = useFollowingLives(); const filteredLives = lives?.filter((live) => !ids.includes(live.broadcastId)) || []; + if (filteredLives.length === 0) { + return ( +
+ no-following-lives +

라이브 중인 방송이 없습니다.

+
+ ); + } + return ( {({ visibleLives, isExpanded, toggle }) => (