diff options
author | eug-vs <eug-vs@keemail.me> | 2020-06-30 01:34:51 +0300 |
---|---|---|
committer | eug-vs <eug-vs@keemail.me> | 2020-06-30 01:34:51 +0300 |
commit | e170d04d5d2c8c86d2683f3accb4feb2d94c881a (patch) | |
tree | c9028ea3ff850774d33cbc510eb19dd0e9f7aade /src/hooks/useAuth.tsx | |
parent | b31ed66aafbe1d5dbe70d0cdfd70864204510d81 (diff) | |
download | which-ui-e170d04d5d2c8c86d2683f3accb4feb2d94c881a.tar.gz |
style: fix linting errors
Diffstat (limited to 'src/hooks/useAuth.tsx')
-rw-r--r-- | src/hooks/useAuth.tsx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/hooks/useAuth.tsx b/src/hooks/useAuth.tsx index de64c46..55e142c 100644 --- a/src/hooks/useAuth.tsx +++ b/src/hooks/useAuth.tsx @@ -24,7 +24,7 @@ const authContext = createContext<ContextType>({ const useProvideAuth = () => { const [user, setUser] = useState<User | null>(null); - const login = (username: string, password: string, remember = true): Promise<boolean> => { + const login: ContextType['login'] = (username, password, remember = true) => { return post('/authentication', { strategy: 'local', username, @@ -71,7 +71,7 @@ export const AuthProvider: React.FC = ({ children }) => { return <Provider value={auth}>{children}</Provider>; }; -export const useAuth = () => { +export const useAuth = (): ContextType => { return useContext(authContext); }; |