diff options
author | Mo Tarbin <mhed.t91@gmail.com> | 2024-07-06 02:33:06 -0400 |
---|---|---|
committer | Mo Tarbin <mhed.t91@gmail.com> | 2024-07-06 02:33:06 -0400 |
commit | 9a07689dfeb736341b4f1b378e0ec758ea9cd0ff (patch) | |
tree | 0fe096809a9cc6baaa0052c091a3a60766274224 /src/views/Authorization | |
parent | c34da50c8c1564c9c6556522bf12a93639c1f160 (diff) | |
download | donetick-frontend-9a07689dfeb736341b4f1b378e0ec758ea9cd0ff.tar.gz donetick-frontend-9a07689dfeb736341b4f1b378e0ec758ea9cd0ff.tar.bz2 donetick-frontend-9a07689dfeb736341b4f1b378e0ec758ea9cd0ff.zip |
feat: Add NFC tag writing functionality to ChoreCard component, Add Email to sign up
Diffstat (limited to '')
-rw-r--r-- | src/views/Authorization/LoginView.jsx | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/views/Authorization/LoginView.jsx b/src/views/Authorization/LoginView.jsx index 2ffcef4..721a5b3 100644 --- a/src/views/Authorization/LoginView.jsx +++ b/src/views/Authorization/LoginView.jsx @@ -62,7 +62,6 @@ const LoginView = () => { } const loggedWithProvider = function (provider, data) { - console.log(provider, data) return fetch(API_URL + `/auth/${provider}/callback`, { method: 'POST', headers: { @@ -80,8 +79,14 @@ const LoginView = () => { return response.json().then(data => { localStorage.setItem('ca_token', data.token) localStorage.setItem('ca_expiration', data.expire) - // setIsLoggedIn(true); - getUserProfileAndNavigateToHome() + + const redirectUrl = Cookies.get('ca_redirect') + if (redirectUrl) { + Cookies.remove('ca_redirect') + Navigate(redirectUrl) + } else { + getUserProfileAndNavigateToHome() + } }) } return response.json().then(error => { |