diff --git a/src/common/useUser.js b/src/common/useUser.js index dd7f97482..cb92a36b6 100644 --- a/src/common/useUser.js +++ b/src/common/useUser.js @@ -13,7 +13,6 @@ const useUser = () => { setUser(state.ctx.content.auth ? state.ctx.content.auth.user : null); }; core.on('NewModel', onNewState); - onNewState(); return () => { core.off('NewModel', onNewState); }; diff --git a/src/routes/Intro/Intro.js b/src/routes/Intro/Intro.js index 8b7e8983d..beb35e26d 100644 --- a/src/routes/Intro/Intro.js +++ b/src/routes/Intro/Intro.js @@ -9,7 +9,6 @@ const ConsentCheckbox = require('./ConsentCheckbox'); const styles = require('./styles'); const SIGNUP_FORM = 'signup'; -const baseUrl = 'https://www.strem.io'; const Intro = ({ queryParams }) => { const { core } = useServices(); @@ -90,7 +89,7 @@ const Intro = ({ queryParams }) => { const loginWithFacebook = React.useCallback(() => { FB.login((response) => { if (response.status === 'connected') { - fetch(baseUrl + "/fb-login-with-token/" + encodeURIComponent(response.authResponse.accessToken), { timeout: 10 * 1000 }) + fetch('https://www.strem.io/fb-login-with-token/' + encodeURIComponent(response.authResponse.accessToken), { timeout: 10 * 1000 }) .then((resp) => { if (resp.status < 200 || resp.status >= 300) { throw new Error('Login failed at getting token from Stremio with status ' + resp.status);