diff options
| author | Wolfboy248 <121288977+Wolfboy248@users.noreply.github.com> | 2024-07-11 19:22:00 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-11 20:22:00 +0300 |
| commit | 4bdb77287866c47f5b61d6472b3ff9cc4020f35e (patch) | |
| tree | a8aac6098d991e5ae607dd7264f7bf2631d84e99 /frontend/src/components/login.js | |
| parent | docs: add wolfboy248 onto project team (#179) (diff) | |
| download | lphub-4bdb77287866c47f5b61d6472b3ff9cc4020f35e.tar.gz lphub-4bdb77287866c47f5b61d6472b3ff9cc4020f35e.tar.bz2 lphub-4bdb77287866c47f5b61d6472b3ff9cc4020f35e.zip | |
fix: about page crash, update packages (#181)
Diffstat (limited to 'frontend/src/components/login.js')
| -rw-r--r-- | frontend/src/components/login.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/frontend/src/components/login.js b/frontend/src/components/login.js index 2b735cb..f86ad44 100644 --- a/frontend/src/components/login.js +++ b/frontend/src/components/login.js | |||
| @@ -23,7 +23,11 @@ const [isLoggedIn, setIsLoggedIn] = React.useState(false); | |||
| 23 | React.useEffect(() => { | 23 | React.useEffect(() => { |
| 24 | fetch(`https://lp.ardapektezol.com/api/v1/token`) | 24 | fetch(`https://lp.ardapektezol.com/api/v1/token`) |
| 25 | .then(r => r.json()) | 25 | .then(r => r.json()) |
| 26 | .then(d => setToken(d.data.token)) | 26 | .then(d => { |
| 27 | if (d.data != null) { | ||
| 28 | setToken(d.data.token) | ||
| 29 | } | ||
| 30 | }) | ||
| 27 | }, []); | 31 | }, []); |
| 28 | 32 | ||
| 29 | 33 | ||