From d19a9043d6f7dc7aab56ac1e04cd2ec8ad463180 Mon Sep 17 00:00:00 2001 From: Theo Date: Fri, 27 Oct 2023 10:47:41 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8DTabBar=E4=B8=ADrou?= =?UTF-8?q?te=E4=B8=BA=E7=A9=BA=E4=BC=9A=E5=AF=BC=E8=87=B4app=E5=A5=94?= =?UTF-8?q?=E6=BA=83=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/recommendSheets/components/body/index.tsx | 3 +++ src/pages/topList/components/topListBody.tsx | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/pages/recommendSheets/components/body/index.tsx b/src/pages/recommendSheets/components/body/index.tsx index f8dd0114..c5e95a1e 100644 --- a/src/pages/recommendSheets/components/body/index.tsx +++ b/src/pages/recommendSheets/components/body/index.tsx @@ -53,6 +53,9 @@ export default function Body() { /> ); + if (!routes?.length) { + return null; + } return ( Date: Fri, 27 Oct 2023 12:42:38 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20=E7=BB=99null=E8=BF=94=E5=9B=9E?= =?UTF-8?q?=E6=94=B9=E6=88=90=E9=BB=98=E8=AE=A4=E7=A9=BA=E7=99=BD=E7=BB=84?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/recommendSheets/components/body/index.tsx | 3 ++- src/pages/topList/components/topListBody.tsx | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/pages/recommendSheets/components/body/index.tsx b/src/pages/recommendSheets/components/body/index.tsx index c5e95a1e..80636fdd 100644 --- a/src/pages/recommendSheets/components/body/index.tsx +++ b/src/pages/recommendSheets/components/body/index.tsx @@ -6,6 +6,7 @@ import PluginManager from '@/core/pluginManager'; import {fontWeightConst} from '@/constants/uiConst'; import SheetBody from './sheetBody'; import useColors from '@/hooks/useColors'; +import Empty from '@/components/base/empty'; export default function Body() { const [index, setIndex] = useState(0); @@ -54,7 +55,7 @@ export default function Body() { ); if (!routes?.length) { - return null; + return ; } return ( ({ @@ -22,7 +23,7 @@ export default function TopListBody() { [], ); if (!routes?.length) { - return null; + return ; } return (