mirror of
https://github.com/AykutSarac/jsoncrack.com.git
synced 2025-01-27 15:22:56 +08:00
feat: update user ga events
This commit is contained in:
parent
4a5dcfb704
commit
f3a56348c1
@ -27,7 +27,14 @@ const useUser = create<UserStates & UserActions>()(set => ({
|
||||
},
|
||||
logout: async () => {
|
||||
toast.loading("Logging out...", { id: "logout" });
|
||||
await supabase.auth.signOut();
|
||||
|
||||
const { error } = await supabase.auth.signOut({ scope: "local" });
|
||||
if (error) {
|
||||
toast.error("Failed to log out.");
|
||||
return;
|
||||
}
|
||||
|
||||
gaEvent("engagement", "logout");
|
||||
set(initialStates);
|
||||
toast.success("Logged out.", { id: "logout" });
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user