From 975dccebfcf51878b790a765d8e92ebcad895a24 Mon Sep 17 00:00:00 2001
From: Kamal Wickramanayake <kamal@inbox.lk>
Date: Sat, 4 Jul 2026 06:42:12 +0530
Subject: Microservice react-app - posts hidden for anonymous users

---
 microservices/04-react-app/src/components/Navbar.jsx | 3 +++
 1 file changed, 3 insertions(+)

(limited to 'microservices/04-react-app/src/components/Navbar.jsx')

diff --git a/microservices/04-react-app/src/components/Navbar.jsx b/microservices/04-react-app/src/components/Navbar.jsx
index 9697c73..bc79138 100644
--- a/microservices/04-react-app/src/components/Navbar.jsx
+++ b/microservices/04-react-app/src/components/Navbar.jsx
@@ -29,11 +29,14 @@ const Navbar = () => {
                         About
                     </NavLink>
                 </li>
+
+                {isLoggedIn() && (
                 <li>
                     <NavLink className="nav-link" to="/posts" end>
                         Posts
                     </NavLink>
                 </li>
+                )}
 
                 <RoleGuard allowedRoles={['ADMIN']}>
                     <li>
-- 
cgit v1.2.3

