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>
|
<Button onClick={() => onDownloadClick()}>Download</Button>
|
||||||
)
|
)
|
||||||
|
|
||||||
|
const onUseModelClick = () => {
|
||||||
|
startModel(model.id)
|
||||||
|
setMainViewState(MainViewState.Thread)
|
||||||
|
}
|
||||||
|
|
||||||
if (isDownloaded) {
|
if (isDownloaded) {
|
||||||
downloadButton = (
|
downloadButton = (
|
||||||
<Button
|
<Button
|
||||||
themes="success"
|
themes="success"
|
||||||
className="min-w-[98px]"
|
className="min-w-[98px]"
|
||||||
onClick={() => {
|
onClick={onUseModelClick}
|
||||||
startModel(model.id)
|
|
||||||
setMainViewState(MainViewState.MyModels)
|
|
||||||
}}
|
|
||||||
>
|
>
|
||||||
Use
|
Use
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user