diff options
| author | Nidboj132 <lol2s@vp.plm> | 2023-05-06 20:10:36 +0200 |
|---|---|---|
| committer | Nidboj132 <lol2s@vp.plm> | 2023-05-06 20:10:36 +0200 |
| commit | d879940f923466a8ca72f7d0e078982ac95c0907 (patch) | |
| tree | 2055c5fee813b87a4decafe9aa1c09bd62c6f9fb /frontend/src/components | |
| parent | login (diff) | |
| download | lphub-d879940f923466a8ca72f7d0e078982ac95c0907.tar.gz lphub-d879940f923466a8ca72f7d0e078982ac95c0907.tar.bz2 lphub-d879940f923466a8ca72f7d0e078982ac95c0907.zip | |
login
Diffstat (limited to 'frontend/src/components')
| -rw-r--r-- | frontend/src/components/login.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/frontend/src/components/login.js b/frontend/src/components/login.js index a4a3397..08c8114 100644 --- a/frontend/src/components/login.js +++ b/frontend/src/components/login.js | |||
| @@ -35,6 +35,7 @@ React.useEffect(() => { | |||
| 35 | }}) | 35 | }}) |
| 36 | .then(r => r.json()) | 36 | .then(r => r.json()) |
| 37 | .then(d => { | 37 | .then(d => { |
| 38 | |||
| 38 | console.log("data:", d); | 39 | console.log("data:", d); |
| 39 | setProfile(d.data); | 40 | setProfile(d.data); |
| 40 | console.log("profile:", profile); | 41 | console.log("profile:", profile); |
| @@ -44,6 +45,10 @@ React.useEffect(() => { | |||
| 44 | }); | 45 | }); |
| 45 | }, [token]); | 46 | }, [token]); |
| 46 | 47 | ||
| 48 | React.useEffect(() => { | ||
| 49 | console.log("profile 2:", profile); | ||
| 50 | setIsLoggedIn(true) | ||
| 51 | }, [profile]); | ||
| 47 | 52 | ||
| 48 | return ( | 53 | return ( |
| 49 | <> | 54 | <> |