enzostvs HF Staff commited on
Commit
4d1ff11
·
1 Parent(s): f1dc792
Files changed (1) hide show
  1. hooks/useUser.ts +0 -2
hooks/useUser.ts CHANGED
@@ -70,7 +70,6 @@ export const useUser = (initialData?: {
70
  .post("/auth", { code })
71
  .then(async (res: any) => {
72
  if (res.data && res.data.access_token) {
73
- // Set cookie using useCookie hook
74
  const expiresIn = res.data.expires_in || 3600;
75
  const expiresDate = new Date();
76
  expiresDate.setTime(expiresDate.getTime() + expiresIn * 1000);
@@ -82,7 +81,6 @@ export const useUser = (initialData?: {
82
  secure: window.location.protocol === 'https:',
83
  });
84
 
85
- // Refetch user data from /api/me
86
  const meResponse = await api.get("/me");
87
  if (meResponse.data) {
88
  client.setQueryData(["user.me"], {
 
70
  .post("/auth", { code })
71
  .then(async (res: any) => {
72
  if (res.data && res.data.access_token) {
 
73
  const expiresIn = res.data.expires_in || 3600;
74
  const expiresDate = new Date();
75
  expiresDate.setTime(expiresDate.getTime() + expiresIn * 1000);
 
81
  secure: window.location.protocol === 'https:',
82
  });
83
 
 
84
  const meResponse = await api.get("/me");
85
  if (meResponse.data) {
86
  client.setQueryData(["user.me"], {