From 5b1dc5683784432d72d529b37caaf181c988d79b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Geonizeli?= Date: Mon, 13 Sep 2021 20:54:58 -0300 Subject: [PATCH] show pages to unauthenticated user --- app/javascript/src/Routes.tsx | 37 ++++++++----------- .../src/components/Navbar/Navbar.tsx | 3 +- .../src/components/SideNav/SideNav.tsx | 4 -- .../src/pages/Dashboard/Dashboard.tsx | 4 +- .../src/pages/Orders/Deposit/Deposit.tsx | 4 ++ .../src/pages/Orders/Exchange/Exchange.tsx | 5 +++ .../src/pages/Orders/Stake/Stake.tsx | 4 ++ 7 files changed, 32 insertions(+), 29 deletions(-) diff --git a/app/javascript/src/Routes.tsx b/app/javascript/src/Routes.tsx index db22c21..9ca3819 100644 --- a/app/javascript/src/Routes.tsx +++ b/app/javascript/src/Routes.tsx @@ -2,36 +2,29 @@ import type { FC } from "react"; import React from "react"; import { Switch, Route } from "react-router-dom"; -import { useCurrentUser } from "./contexts/UserProvider"; import { Dashbaord, Home, Orders, Wallet } from "./pages"; export const Routes: FC = () => { - const { isAuthenticated } = useCurrentUser(); - return ( - {isAuthenticated && ( - <> - - - - - - - - - - - - - - - - - )} + + + + + + + + + + + + + + + ); }; diff --git a/app/javascript/src/components/Navbar/Navbar.tsx b/app/javascript/src/components/Navbar/Navbar.tsx index fde8013..f0b87eb 100644 --- a/app/javascript/src/components/Navbar/Navbar.tsx +++ b/app/javascript/src/components/Navbar/Navbar.tsx @@ -25,8 +25,7 @@ export const Navbar = () => {