diff --git a/uploader/client/src/context/UploaderUserProvider.tsx b/uploader/client/src/context/UploaderUserProvider.tsx index 4d4514364..cf0bb609f 100644 --- a/uploader/client/src/context/UploaderUserProvider.tsx +++ b/uploader/client/src/context/UploaderUserProvider.tsx @@ -11,9 +11,11 @@ export default function UploaderUserProvider({children}: Props) { const [uploaderUser, setUploaderUser] = React.useState(); React.useEffect(() => { - apiClient.get('/me').then(r => { - setUploaderUser(r.data); - }) + if (tokens) { + apiClient.get('/me').then(r => { + setUploaderUser(r.data); + }); + } }, [tokens]); return