Skip to content

Commit

Permalink
Merge pull request #425 from ameerul-deriv/WEBREL-3442-on-redirection…
Browse files Browse the repository at this point in the history
…-from-th-to-p2p-showing-infinite-loading

Ameerul / WEBREL-3442 On Redirection to from traders hub to P2P the P2P page shows infinite loading screen
  • Loading branch information
ameerul-deriv authored Dec 23, 2024
2 parents fffba41 + 00a5106 commit 92eea90
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/hooks/custom-hooks/useOAuth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ const useOAuth = (): UseOAuthReturn => {
const authTokenCookie = Cookies.get('authtoken');

if (from === 'tradershub' && authTokenCookie) {
localStorage.setItem('authToken', authTokenCookie);
const cleanedAuthToken = decodeURIComponent(authTokenCookie).replace(/^"|"$/g, '');
localStorage.setItem('authToken', cleanedAuthToken);
Cookies.remove('authtoken');
window.location.href = window.location.origin;
}
Expand Down

0 comments on commit 92eea90

Please sign in to comment.