From b52c7cf35998de7f9fd86212f4be5a78f5079398 Mon Sep 17 00:00:00 2001 From: zuies Date: Mon, 11 Dec 2023 11:15:59 +0300 Subject: [PATCH] add statement for checking id --- src/components/communitySettings/platform/TcPlatform.tsx | 1 + src/pages/community-settings/platform/[id].tsx | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/communitySettings/platform/TcPlatform.tsx b/src/components/communitySettings/platform/TcPlatform.tsx index f8c9fe4e..763449f8 100644 --- a/src/components/communitySettings/platform/TcPlatform.tsx +++ b/src/components/communitySettings/platform/TcPlatform.tsx @@ -70,6 +70,7 @@ function TcPlatform({ platformName = 'Discord' }: TcPlatformProps) { }; useEffect(() => { + if (!id) return; fetchPlatform(); }, [id, retrievePlatformById]); diff --git a/src/pages/community-settings/platform/[id].tsx b/src/pages/community-settings/platform/[id].tsx index 232aa4b4..d32a900a 100644 --- a/src/pages/community-settings/platform/[id].tsx +++ b/src/pages/community-settings/platform/[id].tsx @@ -1,4 +1,3 @@ -'use client'; import TcPlatform from '../../../components/communitySettings/platform'; import SEO from '../../../components/global/SEO'; import TcBreadcrumbs from '../../../components/shared/TcBreadcrumbs';