refactor(signOut): remove redundant analytics reset on sign out

- Removed the call to reset analytics in the useSignOut hook.
- Cleaned up the data control settings by eliminating unnecessary analytics reset logic.

This refactor streamlines the sign-out process and improves code clarity.

Signed-off-by: Innei <tukon479@gmail.com>
This commit is contained in:
Innei 2025-03-25 22:27:14 +08:00
parent b5fc2f6a70
commit f0498c69e9
No known key found for this signature in database
GPG Key ID: 0F62D33977F021F7
2 changed files with 1 additions and 4 deletions

View File

@ -22,7 +22,7 @@ export const useSignOut = () =>
// Clear local storage
clearStorage()
window.analytics?.reset()
// clear local store data
await Promise.allSettled([
clearLocalPersistStoreData(),

View File

@ -56,9 +56,6 @@ export const SettingDataControl = () => {
setGeneralSetting("sendAnonymousData", value)
if (value) {
initAnalytics()
} else {
window.analytics?.reset()
delete window.analytics
}
},
}),