refactor(web): remove typescript
This commit is contained in:
10
packages/web/src/hooks/useAuthentication.js
Normal file
10
packages/web/src/hooks/useAuthentication.js
Normal file
@@ -0,0 +1,10 @@
|
||||
import * as React from 'react';
|
||||
import { AuthenticationContext } from 'contexts/Authentication';
|
||||
export default function useAuthentication() {
|
||||
const authenticationContext = React.useContext(AuthenticationContext);
|
||||
return {
|
||||
token: authenticationContext.token,
|
||||
updateToken: authenticationContext.updateToken,
|
||||
isAuthenticated: Boolean(authenticationContext.token),
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user