From 687a962bd19be4d39c9a4ba38d7167e5cd6c0942 Mon Sep 17 00:00:00 2001 From: Drumil Patel <42701709+drumilpatel2000@users.noreply.github.com> Date: Sat, 8 Feb 2020 15:30:48 +0530 Subject: [PATCH] Add conditional rendering of Navlink for Consoles (#6761) * Add conditional rendering of Navlink for Consoles Signed-off-by: Drumil Patel * Replacing if else with only if conditional rendering Signed-off-by: Drumil Patel * Add tests and removing global declaration in Navbar Signed-off-by: Drumil Patel * Correct Navbar Testcases and add types for ConsolesLink Signed-off-by: Drumil Patel * Change names for Console link as per-naming convention Signed-off-by: Drumil Patel * Change prop names to AppProps and NavbarProps respectively Signed-off-by: Drumil Patel --- web/ui/react-app/public/index.html | 11 ++++++++-- web/ui/react-app/src/App.tsx | 8 ++++++-- web/ui/react-app/src/Navbar.test.tsx | 30 ++++++++++++++++++++++++++++ web/ui/react-app/src/Navbar.tsx | 11 +++++++++- web/ui/react-app/src/index.tsx | 19 ++++++++++++++---- web/web.go | 1 + 6 files changed, 71 insertions(+), 9 deletions(-) create mode 100644 web/ui/react-app/src/Navbar.test.tsx diff --git a/web/ui/react-app/public/index.html b/web/ui/react-app/public/index.html index 2e118e50d..e5943537b 100755 --- a/web/ui/react-app/public/index.html +++ b/web/ui/react-app/public/index.html @@ -10,11 +10,18 @@ - +