Skip to content

Commit

Permalink
bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
4rthem committed Dec 12, 2023
1 parent dc13131 commit 91b57ae
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions uploader/client/src/context/UploaderUserProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@ export default function UploaderUserProvider({children}: Props) {
const [uploaderUser, setUploaderUser] = React.useState<UploaderUser | undefined>();

React.useEffect(() => {
apiClient.get('/me').then(r => {
setUploaderUser(r.data);
})
if (tokens) {
apiClient.get('/me').then(r => {
setUploaderUser(r.data);
});
}
}, [tokens]);

return <UploaderUserContext.Provider value={{
Expand Down

0 comments on commit 91b57ae

Please sign in to comment.