From 0772c535b3da5e1335832ae8804fe6394ecd27e0 Mon Sep 17 00:00:00 2001 From: Thawanrat Rojamornrat Date: Sun, 24 Nov 2024 22:57:19 +0700 Subject: [PATCH] Add noti in navbar --- .env | 4 +- frontend/src/components/Navbar.jsx | 323 +++++++++++++++++------------ 2 files changed, 198 insertions(+), 129 deletions(-) diff --git a/.env b/.env index c3ff4de..53e3e47 100644 --- a/.env +++ b/.env @@ -1,5 +1,5 @@ PORT = 3000 -DATABASE_URL="mysql://root:@localhost:3306/hack_db" +DATABASE_URL="mysql://root:@localhost:3307/hack_db" # --- For Docker-compose -# DATABASE_URL="mysql://root:root@localhost:3306/hack_db" \ No newline at end of file +# DATABASE_URL="mysql://root:root@localhost:3307/hack_db" \ No newline at end of file diff --git a/frontend/src/components/Navbar.jsx b/frontend/src/components/Navbar.jsx index 7a18448..b5ae28d 100644 --- a/frontend/src/components/Navbar.jsx +++ b/frontend/src/components/Navbar.jsx @@ -1,5 +1,6 @@ import { useState, useEffect } from 'react'; import { Search, Menu, X, Bell } from 'lucide-react'; +import axios from 'axios'; function Navbar() { const [isOpen, setIsOpen] = useState(false); @@ -19,149 +20,217 @@ function Navbar() { window.location.href = '/login'; }; - return ( - + ); + } + + return ; } export default Navbar;