diff options
Diffstat (limited to 'frontend')
| -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 | <> |