chore: optimized style (#4098)

This commit is contained in:
JimmFly
2023-09-02 03:28:16 +08:00
committed by GitHub
parent 189e91e6ca
commit 8845bb9b4b
9 changed files with 70 additions and 26 deletions
+12 -9
View File
@@ -53,16 +53,19 @@ export function useDatasourceSync(workspace: Workspace) {
remoteProvider.datasource,
localProvider.datasource
)
.then(() => {
startTransition(() => {
setStatus({
type: 'synced',
.then(async () => {
// by default, the syncing status will show for 2.4s
setTimeout(() => {
startTransition(() => {
setStatus({
type: 'synced',
});
pushNotification({
title: 'Synced successfully',
type: 'success',
});
});
pushNotification({
title: 'Synced successfully',
type: 'success',
});
});
}, 2400);
})
.catch(error => {
startTransition(() => {