From 32e7a77e3d8ebb14d143a92988acc6738bd98106 Mon Sep 17 00:00:00 2001 From: James Date: Tue, 5 Dec 2023 18:17:02 +0700 Subject: [PATCH] fix: update wrong main view state when use a model Signed-off-by: James --- .../ExploreModels/ExploreModelItemHeader/index.tsx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/web/screens/ExploreModels/ExploreModelItemHeader/index.tsx b/web/screens/ExploreModels/ExploreModelItemHeader/index.tsx index d152d9b66d..3621c90ec6 100644 --- a/web/screens/ExploreModels/ExploreModelItemHeader/index.tsx +++ b/web/screens/ExploreModels/ExploreModelItemHeader/index.tsx @@ -59,15 +59,17 @@ const ExploreModelItemHeader: React.FC = ({ model, onClick, open }) => { ) + const onUseModelClick = () => { + startModel(model.id) + setMainViewState(MainViewState.Thread) + } + if (isDownloaded) { downloadButton = (