Skip to content

Commit

Permalink
Update useLogout.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
tristandostaler authored Sep 9, 2024
1 parent 185603d commit 0c51e26
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/hooks/AppWriteAPI/useLogout.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';

import { googleLogout } from '@react-oauth/google';

import { account } from '@hooks/AppWriteAPI/client';
import useStore from '@store/cloud-auth-store';

const useLogout = () => {
Expand All @@ -11,6 +11,8 @@ const useLogout = () => {
const logout = () => {
setIsAppWriteLoggedIn(false);
setFileId(undefined);
var session = account.getSession("current");
account.deleteSession(session["$id"]);

Check failure on line 15 in src/hooks/AppWriteAPI/useLogout.ts

View workflow job for this annotation

GitHub Actions / build

Element implicitly has an 'any' type because expression of type '"$id"' can't be used to index type 'Promise<Session>'.
}
return logout;
};
Expand Down

0 comments on commit 0c51e26

Please sign in to comment.