fix: type import (#2715)

(cherry picked from commit 7f2006488e)
This commit is contained in:
Himself65
2023-06-07 22:47:02 +08:00
committed by Alex Yang
parent cd5aec42a0
commit 28e05dc92c
24 changed files with 60 additions and 91 deletions
@@ -122,6 +122,7 @@ const useDefaultDBLocation = () => {
const [defaultDBLocation, setDefaultDBLocation] = useState('');
useEffect(() => {
// @ts-expect-error
window.apis?.db.getDefaultStorageLocation().then(dir => {
setDefaultDBLocation(dir);
});
@@ -147,6 +148,7 @@ const SetDBLocationContent = ({
if (result?.filePath) {
onConfirmLocation(result.filePath);
} else if (result?.error) {
// @ts-expect-error
toast(t[result.error]());
}
};
@@ -277,6 +279,7 @@ export const CreateWorkspaceModal = ({
setStep('set-syncing-mode');
} else if (result.error || result.canceled) {
if (result.error) {
// @ts-expect-error
toast(t[result.error]());
}
onClose();