diff --git a/client/src/components/nav.tsx b/client/src/components/nav.tsx index f8e93c9..afc5718 100644 --- a/client/src/components/nav.tsx +++ b/client/src/components/nav.tsx @@ -10,15 +10,15 @@ function showAdmin(user) { return user && user.email === 'ntr@mnml.gg'; } -const DEFAULT_ROUTE = '/info'; +const DEFAULT_ROUTE = '/'; const Nav = () => { const dispatch = useDispatch() const user = useSelector((state: State) => state.user); useEffect(() => { - if (!user) route('/login'); - route(DEFAULT_ROUTE) + if (!user) return route('/login'); + return route(DEFAULT_ROUTE) }, [user]) async function logoutClick(e) { diff --git a/client/src/routes/login.tsx b/client/src/routes/login.tsx index 1b911de..6d3d763 100644 --- a/client/src/routes/login.tsx +++ b/client/src/routes/login.tsx @@ -94,7 +94,7 @@ function LoginPage({ mode }) {
Mates Crates is a record importing service.
We bundle orders together from thousands of online stores to reduce the cost of shipping vinyl.
Based in Preston.