fix: update wrong main view state when use a model (#861)
Signed-off-by: James <james@jan.ai> Co-authored-by: James <james@jan.ai>
This commit is contained in:
parent
848bdbc148
commit
aa8e700be5
@ -59,15 +59,17 @@ const ExploreModelItemHeader: React.FC<Props> = ({ model, onClick, open }) => {
|
||||
<Button onClick={() => onDownloadClick()}>Download</Button>
|
||||
)
|
||||
|
||||
const onUseModelClick = () => {
|
||||
startModel(model.id)
|
||||
setMainViewState(MainViewState.Thread)
|
||||
}
|
||||
|
||||
if (isDownloaded) {
|
||||
downloadButton = (
|
||||
<Button
|
||||
themes="success"
|
||||
className="min-w-[98px]"
|
||||
onClick={() => {
|
||||
startModel(model.id)
|
||||
setMainViewState(MainViewState.MyModels)
|
||||
}}
|
||||
onClick={onUseModelClick}
|
||||
>
|
||||
Use
|
||||
</Button>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user