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:
parent
b5fc2f6a70
commit
f0498c69e9
|
|
@ -22,7 +22,7 @@ export const useSignOut = () =>
|
|||
|
||||
// Clear local storage
|
||||
clearStorage()
|
||||
window.analytics?.reset()
|
||||
|
||||
// clear local store data
|
||||
await Promise.allSettled([
|
||||
clearLocalPersistStoreData(),
|
||||
|
|
|
|||
|
|
@ -56,9 +56,6 @@ export const SettingDataControl = () => {
|
|||
setGeneralSetting("sendAnonymousData", value)
|
||||
if (value) {
|
||||
initAnalytics()
|
||||
} else {
|
||||
window.analytics?.reset()
|
||||
delete window.analytics
|
||||
}
|
||||
},
|
||||
}),
|
||||
|
|
|
|||
Loading…
Reference in New Issue