From 31d2c02f9359647822bd5e922dcf6364727e7b33 Mon Sep 17 00:00:00 2001 From: Louis Date: Tue, 6 Aug 2024 13:26:51 +0700 Subject: [PATCH] chore: toast message on model import fail with reason --- web/screens/Settings/ImportingModelModal/index.tsx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/web/screens/Settings/ImportingModelModal/index.tsx b/web/screens/Settings/ImportingModelModal/index.tsx index d54624dba0..0da36e85d9 100644 --- a/web/screens/Settings/ImportingModelModal/index.tsx +++ b/web/screens/Settings/ImportingModelModal/index.tsx @@ -5,6 +5,8 @@ import { useAtomValue, useSetAtom } from 'jotai' import { AlertCircle } from 'lucide-react' +import { toaster } from '@/containers/Toast' + import useCortex from '@/hooks/useCortex' import { getImportModelStageAtom, @@ -41,6 +43,11 @@ const ImportingModelModal = () => { } setImportModelError(model.path, errorMessage) + toaster({ + title: 'Import failed', + description: errorMessage, + type: 'error', + }) } } }