feat(ui): close starter models toast when a model is installed

This commit is contained in:
psychedelicious 2024-05-22 09:38:24 +10:00
parent abc133e936
commit 0ba57d6dc5

View File

@ -17,7 +17,11 @@ export const useStarterModelsToast = () => {
useEffect(() => { useEffect(() => {
if (toast.isActive(TOAST_ID)) { if (toast.isActive(TOAST_ID)) {
return; if (mainModels.length === 0) {
return;
} else {
toast.close(TOAST_ID);
}
} }
if (data && mainModels.length === 0 && !didToast && isEnabled) { if (data && mainModels.length === 0 && !didToast && isEnabled) {
toast({ toast({