mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-04-19 18:02:13 +00:00
fix(Settings): check for trakt token expires
This commit is contained in:
parent
2beaffc9ab
commit
758347076a
1 changed files with 2 additions and 1 deletions
|
|
@ -51,7 +51,8 @@ const Settings = () => {
|
|||
}, [streamingServerUrlInput]);
|
||||
const [traktAuthStarted, setTraktAuthStarted] = React.useState(false);
|
||||
const isTraktAuthenticated = React.useMemo(() => {
|
||||
return profile.auth !== null && profile.auth.user !== null && profile.auth.user.trakt !== null;
|
||||
return profile.auth !== null && profile.auth.user !== null && profile.auth.user.trakt !== null &&
|
||||
(Date.now() / 1000) < (profile.auth.user.trakt.created_at + profile.auth.user.trakt.expires_in);
|
||||
}, [profile.auth]);
|
||||
const configureServerUrlModalButtons = React.useMemo(() => {
|
||||
return [
|
||||
|
|
|
|||
Loading…
Reference in a new issue