chore: remove premium check

This commit is contained in:
AykutSarac 2024-05-04 23:39:44 +03:00
parent 0b5983f2cd
commit 62d1dc98ad
No known key found for this signature in database

View File

@ -30,19 +30,8 @@ const initialStates: UserStates = {
const useUser = create<UserStates & UserActions>()(set => ({
...initialStates,
setSession: async session => {
supabase.rpc("get_subscription_details").then(({ data }) => {
if (data) {
set({
premium: data.premium,
organization: data.orgPremium,
premiumCancelled: !!data.cancelled,
orgAdmin: data.orgAdmin,
});
}
gaEvent("engagement", "login");
set({ user: session.user, isAuthenticated: true });
});
gaEvent("engagement", "login");
set({ user: session.user, isAuthenticated: true });
},
logout: async () => {
toast.loading("Logging out...", { id: "logout" });