diff --git a/frontend/src/pages/App/AppTrends.js b/frontend/src/pages/App/AppTrends.js index 994c2254..0c8ebc5e 100644 --- a/frontend/src/pages/App/AppTrends.js +++ b/frontend/src/pages/App/AppTrends.js @@ -94,9 +94,7 @@ function App() { element={} /> } /> - {isAuthenticated && ( - } /> - )} + } /> } /> } /> } /> diff --git a/frontend/src/pages/Auth/SignUp.js b/frontend/src/pages/Auth/SignUp.js index 2fe58064..b594c547 100644 --- a/frontend/src/pages/Auth/SignUp.js +++ b/frontend/src/pages/Auth/SignUp.js @@ -27,29 +27,25 @@ const SignUpScreen = () => {
-

+

Sign up for
GitHub Trends

diff --git a/frontend/src/pages/Settings/Settings.js b/frontend/src/pages/Settings/Settings.js index 77cca064..28896553 100644 --- a/frontend/src/pages/Settings/Settings.js +++ b/frontend/src/pages/Settings/Settings.js @@ -74,6 +74,7 @@ const SettingsScreen = () => { useOutsideAlerter(wrapperRef, closeDeleteModal); const userId = useSelector((state) => state.user.userId); + const isAuthenticated = userId && userId.length > 0; const userKey = useSelector((state) => state.user.userKey); const privateAccess = useSelector((state) => state.user.privateAccess); const accountTier = privateAccess ? 'Private Workflow' : 'Public Workflow'; @@ -81,6 +82,20 @@ const SettingsScreen = () => { const dispatch = useDispatch(); const logout = () => dispatch(_logout()); + console.log(isAuthenticated, userId, userKey, privateAccess, accountTier); + + if (!isAuthenticated) { + return ( +
+
+

+ Please sign in to access this page +

+
+
+ ); + } + return (