ui: spot improvs

This commit is contained in:
nick-delirium 2024-09-11 11:28:23 +02:00
parent acb679cf18
commit 617dbe4e5e
No known key found for this signature in database
GPG key ID: 93ABD695DF5FDBA0

View file

@ -166,10 +166,10 @@ const Router: React.FC<RouterProps> = (props) => {
}, [scopeSetup])
useEffect(() => {
if (isLoggedIn && location.pathname.includes('login') && localSpotJwt) {
if (!isTokenExpired(localSpotJwt)) {
if (isLoggedIn && (location.pathname.includes('login') || isSpotCb)) {
if (localSpotJwt && !isTokenExpired(localSpotJwt)) {
handleSpotLogin(localSpotJwt);
} else if (isSpotCb) {
} else {
logout();
}
}