mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-03 10:30:12 +08:00
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user