From d5c4f745f12a634e148b9fce03c5f032b4a9c79c Mon Sep 17 00:00:00 2001 From: Louis Date: Mon, 8 Apr 2024 22:38:38 +0700 Subject: [PATCH] fix: model selector lack of warning message when no models downloaded (#2651) --- web/containers/DropdownListSidebar/index.tsx | 25 ++++++++++---------- 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/web/containers/DropdownListSidebar/index.tsx b/web/containers/DropdownListSidebar/index.tsx index 76cbd05dda..bf4d873cc9 100644 --- a/web/containers/DropdownListSidebar/index.tsx +++ b/web/containers/DropdownListSidebar/index.tsx @@ -246,14 +246,15 @@ const DropdownListSidebar = ({
- {downloadedModels.length === 0 ? ( -
-

{`Oops, you don't have a model yet.`}

-
- ) : ( - - <> - {modelOptions.map((x, i) => ( + + + <> + {modelOptions.length === 0 ? ( +
+

{`Oops, you don't have a model yet.`}

+
+ ) : ( + modelOptions.map((x, i) => (
- ))} - -
- )} + )) + )} + +