From 077278e50eccfa1f69060c5ba2e92d0b2a3f1a58 Mon Sep 17 00:00:00 2001 From: Jae Young Ahn Date: Wed, 30 Apr 2025 12:22:48 -0700 Subject: [PATCH 1/8] assignment page scss upadated --- src/pages/AssignmentPage.jsx | 114 ++++++++++----------------- src/scss/components/_assignment.scss | 46 ++++++++++- 2 files changed, 85 insertions(+), 75 deletions(-) diff --git a/src/pages/AssignmentPage.jsx b/src/pages/AssignmentPage.jsx index 5bd8855..11f94e2 100644 --- a/src/pages/AssignmentPage.jsx +++ b/src/pages/AssignmentPage.jsx @@ -1,5 +1,7 @@ import React, { useState } from "react"; import "../scss/components/_assignment.scss"; +import { useEffect } from "react"; + const AssignmentPage = () => { const [studentName, setStudentName] = useState(""); @@ -13,6 +15,11 @@ const AssignmentPage = () => { const [showModal, setShowModal] = useState(false); const [editingIndex, setEditingIndex] = useState(null); + useEffect(() => { + document.title = "Assignment"; + }, []); + + const resetForm = () => { setStudentName(""); setCampID(""); @@ -37,12 +44,10 @@ const AssignmentPage = () => { }; if (editingIndex !== null) { - // Edit mode: update the project at the index const updatedProjects = [...projects]; updatedProjects[editingIndex] = newProject; setProjects(updatedProjects); } else { - // New submission setProjects([...projects, newProject]); } @@ -58,7 +63,7 @@ const AssignmentPage = () => { setProgramID(project.programID); setTitle(project.title); setDescription(project.description); - setFile(null); // File can't be set again for editing, usually. You could add note about this. + setFile(null); setEditingIndex(index); setShowModal(true); }; @@ -70,8 +75,10 @@ const AssignmentPage = () => { return (
-

πŸ“˜ Assignments

- +
+

πŸ“˜ Assignments

+ +
{showModal && (
@@ -80,110 +87,69 @@ const AssignmentPage = () => {
- setStudentName(e.target.value)} - required - /> + setStudentName(e.target.value)} required />
- setCampID(e.target.value)} - required - /> + setCampID(e.target.value)} required />
- setProgramID(e.target.value)} - required - /> + setProgramID(e.target.value)} required />
- setPassword(e.target.value)} - required - /> + setPassword(e.target.value)} required />
- setTitle(e.target.value)} - required - /> + setTitle(e.target.value)} required />
- +
- setFile(e.target.files[0])} - /> + setFile(e.target.files[0])} />
- +
)} -
-

πŸ“‹ Projects

- {projects.map((project, index) => ( -
-
- Student Name: {project.studentName} | CampID: {project.campID} | ProgramID: {project.programID} -
-

{project.title}

-

{project.description}

- {project.fileName && ( -

Uploaded File: {project.fileName}

+ {projects.length > 0 && ( +
+ {/*

πŸ“‹ Projects

*/} + {projects.map((project, index) => ( +
+
+ Student Name: {project.studentName} | CampID: {project.campID} | ProgramID: {project.programID} +
+

{project.title}

+

{project.description}

+ {project.fileName &&

Uploaded File: {project.fileName}

} + +
+ + + +
+
+ ))} +
)} - -
- - - -
-
- ))} -
- ); }; diff --git a/src/scss/components/_assignment.scss b/src/scss/components/_assignment.scss index 7d424b8..ac21492 100644 --- a/src/scss/components/_assignment.scss +++ b/src/scss/components/_assignment.scss @@ -235,4 +235,48 @@ transform: translateY(0); } } -} \ No newline at end of file +} + +.assignment-header-box { + background: #0f0f1a; // dark navy background + border: 2px solid #00bfff; // deep sky blue + border-radius: 12px; + padding: 50px; + text-align: center; + margin-bottom: 2rem; + box-shadow: 0 0 20px #00bfff; + animation: pulseNeonBlue 2s infinite alternate; + + h2 { + color: #00bfff; + margin-bottom: 1rem; + font-weight: bold; + } + + button { + background-color: #000; + border: 2px solid #00bfff; + color: #00bfff; + padding: 10px 20px; + border-radius: 8px; + cursor: pointer; + font-size: 1rem; + font-weight: bold; + transition: all 0.3s ease; + + &:hover { + background-color: #00bfff; + color: #000; + } + } +} + +@keyframes pulseNeonBlue { + from { + box-shadow: 0 0 10px #00bfff, 0 0 20px #00bfff; + } + to { + box-shadow: 0 0 25px #00bfff, 0 0 40px #00bfff; + } +} + From 599182ab91e11e9e9a3c7ccc1cb6a09c29e5091f Mon Sep 17 00:00:00 2001 From: JBB0807 <104856796+JBB0807@users.noreply.github.com> Date: Thu, 1 May 2025 13:32:12 -0700 Subject: [PATCH 2/8] Logout calls back-end --- src/components/Navbar.jsx | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/src/components/Navbar.jsx b/src/components/Navbar.jsx index f507995..0a011b4 100644 --- a/src/components/Navbar.jsx +++ b/src/components/Navbar.jsx @@ -1,7 +1,7 @@ import React, { useState, useEffect, useRef } from "react"; import "../scss/styles.scss"; import "../scss/components/_navbar.scss"; -import { Link, useNavigate } from "react-router-dom"; +import { Link } from "react-router-dom"; const Navbar = () => { const [glitchEffect, setGlitchEffect] = useState(false); @@ -9,23 +9,9 @@ const Navbar = () => { const [user, setUser] = useState(null); const [menuOpen, setMenuOpen] = useState(false); const menuRef = useRef(null); - const navigate = useNavigate(); - const handleLogout = () => { - // Implement client-side logout without calling the backend - // This clears the user state in the frontend - setUser(null); - - // Clear any authentication cookies if they exist - document.cookie.split(";").forEach((cookie) => { - const [name] = cookie.trim().split("="); - document.cookie = `${name}=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;`; - }); - - // Redirect to home page - navigate("/"); - - console.log("Logged out successfully"); + async function handleLogout() { + window.open("http://localhost:8080/auth/logout", "_self"); }; useEffect(() => { From 55a9e8170da2bd0e3ca9171ea5e06798d8878718 Mon Sep 17 00:00:00 2001 From: Jae Young Ahn Date: Fri, 2 May 2025 11:27:34 -0700 Subject: [PATCH 3/8] assignment page scss upadated --- src/pages/AssignmentPage.jsx | 2 +- src/scss/components/_assignment.scss | 31 +++++++++++++++++++++------- 2 files changed, 25 insertions(+), 8 deletions(-) diff --git a/src/pages/AssignmentPage.jsx b/src/pages/AssignmentPage.jsx index 11f94e2..65f9ccd 100644 --- a/src/pages/AssignmentPage.jsx +++ b/src/pages/AssignmentPage.jsx @@ -76,7 +76,7 @@ const AssignmentPage = () => { return (
-

πŸ“˜ Assignments

+

Assignments

diff --git a/src/scss/components/_assignment.scss b/src/scss/components/_assignment.scss index ac21492..ff3fe9b 100644 --- a/src/scss/components/_assignment.scss +++ b/src/scss/components/_assignment.scss @@ -238,19 +238,22 @@ } .assignment-header-box { - background: #0f0f1a; // dark navy background - border: 2px solid #00bfff; // deep sky blue + background: #0f0f1a; + border: 2px solid #00bfff; border-radius: 12px; padding: 50px; text-align: center; margin-bottom: 2rem; - box-shadow: 0 0 20px #00bfff; + // box-shadow: 0 0 20px #00bfff; + box-shadow: rgb(211, 0, 197) 0px 0px 15px, rgb(255, 42, 109) 0px 0px 25px; + border: 1px solid rgb(211, 0, 197); animation: pulseNeonBlue 2s infinite alternate; h2 { color: #00bfff; margin-bottom: 1rem; font-weight: bold; + // text-shadow: rgb(5, 217, 232) 0px 0px 5px; } button { @@ -271,12 +274,26 @@ } } -@keyframes pulseNeonBlue { +// @keyframes pulseNeonBlue { +// from { +// box-shadow: 0 0 10px #00bfff, 0 0 20px #00bfff; +// } +// to { +// box-shadow: 0 0 25px #00bfff, 0 0 40px #00bfff; +// } +// } + +@keyframes pulseNeonHybrid { from { - box-shadow: 0 0 10px #00bfff, 0 0 20px #00bfff; + box-shadow: + 0 0 10px rgba(211, 0, 197, 0.7), + 0 0 20px rgba(255, 42, 109, 0.7), + 0 0 10px rgba(0, 191, 255, 0.7); } to { - box-shadow: 0 0 25px #00bfff, 0 0 40px #00bfff; + box-shadow: + 0 0 25px rgba(211, 0, 197, 0.9), + 0 0 40px rgba(255, 42, 109, 0.9), + 0 0 30px rgba(0, 191, 255, 0.9); } } - From cbc2d631fb64aa001218967650d6de95621bca0a Mon Sep 17 00:00:00 2001 From: Jae Young Ahn Date: Fri, 2 May 2025 12:34:17 -0700 Subject: [PATCH 4/8] fetching assignment with API --- src/pages/AssignmentPage.jsx | 66 +++++++++++++++++++++------- src/scss/components/_assignment.scss | 39 ++++++++++++++++ 2 files changed, 89 insertions(+), 16 deletions(-) diff --git a/src/pages/AssignmentPage.jsx b/src/pages/AssignmentPage.jsx index 65f9ccd..5dd5d44 100644 --- a/src/pages/AssignmentPage.jsx +++ b/src/pages/AssignmentPage.jsx @@ -1,7 +1,5 @@ -import React, { useState } from "react"; +import React, { useState, useEffect } from "react"; import "../scss/components/_assignment.scss"; -import { useEffect } from "react"; - const AssignmentPage = () => { const [studentName, setStudentName] = useState(""); @@ -17,8 +15,30 @@ const AssignmentPage = () => { useEffect(() => { document.title = "Assignment"; + fetchAssignments(); }, []); - + + const fetchAssignments = async () => { + try { + const res = await fetch("http://localhost:8082/assignments/instructor/9", { + // credentials: "include", + }); + if (!res.ok) throw new Error("Failed to fetch"); + + const data = await res.json(); + console.log("Fetched assignments:", data); // βœ… This line shows what’s coming from the API + setProjects(data); + + // Optional: Remove duplicate assignment IDs if needed + const unique = Array.from( + new Map(data.map((item) => [item.assignmentid, item])).values() + ); + + setProjects(unique); + } catch (error) { + console.error("Error fetching assignments:", error); + } + }; const resetForm = () => { setStudentName(""); @@ -35,9 +55,9 @@ const AssignmentPage = () => { e.preventDefault(); const newProject = { - studentName, - campID, - programID, + studentname: studentName, + campid: campID, + programid: programID, title, description, fileName: file ? file.name : null, @@ -58,11 +78,11 @@ const AssignmentPage = () => { const handleEdit = (index) => { const project = projects[index]; - setStudentName(project.studentName); - setCampID(project.campID); - setProgramID(project.programID); - setTitle(project.title); - setDescription(project.description); + setStudentName(project.studentname || project.studentName || ""); + setCampID(project.campid || project.campID || ""); + setProgramID(project.programid || project.programID || ""); + setTitle(project.title || ""); + setDescription(project.description || ""); setFile(null); setEditingIndex(index); setShowModal(true); @@ -131,16 +151,30 @@ const AssignmentPage = () => { {projects.length > 0 && (
- {/*

πŸ“‹ Projects

*/} {projects.map((project, index) => (
- Student Name: {project.studentName} | CampID: {project.campID} | ProgramID: {project.programID} + Student Name: {project.studentname || project.studentName} |{" "} + CampID: {project.campid || project.campID} |{" "} + ProgramID: {project.programid || project.programID}
-

{project.title}

-

{project.description}

+ + {project.title &&

{project.title}

} + {project.description &&

{project.description}

} {project.fileName &&

Uploaded File: {project.fileName}

} + {project.assignmenturl && ( +

+ View Assignment +

+ )} + {project.originalfile && ( +

+ Original File |{" "} + Editable File +

+ )} +
diff --git a/src/scss/components/_assignment.scss b/src/scss/components/_assignment.scss index ff3fe9b..9f440fc 100644 --- a/src/scss/components/_assignment.scss +++ b/src/scss/components/_assignment.scss @@ -297,3 +297,42 @@ 0 0 30px rgba(0, 191, 255, 0.9); } } + + +.assignment-list-box { + margin-top: 40px; + + h3 { + font-size: 1.5rem; + margin-bottom: 20px; + } + + .assignment-cards { + display: grid; + grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); + gap: 20px; + } + + .assignment-card { + background: #f5f5f5; + padding: 20px; + border-radius: 12px; + box-shadow: 0 2px 6px rgba(0,0,0,0.1); + transition: all 0.3s ease; + + p { + margin: 6px 0; + } + + a { + color: #2c7be5; + text-decoration: underline; + word-break: break-word; + } + + &:hover { + transform: translateY(-4px); + box-shadow: 0 4px 12px rgba(0,0,0,0.15); + } + } +} From 1f7124a786388c85b4feecf38c3ebbf8a4d944e8 Mon Sep 17 00:00:00 2001 From: Jae Young Ahn Date: Fri, 2 May 2025 13:51:25 -0700 Subject: [PATCH 5/8] assignment page styling updated --- src/pages/AssignmentPage.jsx | 5 +- src/scss/components/_assignment.scss | 105 ++++++++++++++++++++++----- 2 files changed, 90 insertions(+), 20 deletions(-) diff --git a/src/pages/AssignmentPage.jsx b/src/pages/AssignmentPage.jsx index 5dd5d44..d8b5941 100644 --- a/src/pages/AssignmentPage.jsx +++ b/src/pages/AssignmentPage.jsx @@ -20,14 +20,13 @@ const AssignmentPage = () => { const fetchAssignments = async () => { try { - const res = await fetch("http://localhost:8082/assignments/instructor/9", { + const res = await fetch("http://localhost:8082/instructor/list/9", { // credentials: "include", }); if (!res.ok) throw new Error("Failed to fetch"); const data = await res.json(); - console.log("Fetched assignments:", data); // βœ… This line shows what’s coming from the API - setProjects(data); + // Optional: Remove duplicate assignment IDs if needed const unique = Array.from( diff --git a/src/scss/components/_assignment.scss b/src/scss/components/_assignment.scss index 9f440fc..f83f856 100644 --- a/src/scss/components/_assignment.scss +++ b/src/scss/components/_assignment.scss @@ -1,7 +1,11 @@ .assignment-page { - max-width: 600px; - margin: auto; + max-width: 100%; padding: 20px; + margin-top: 70rem; + overflow-x: hidden; + overflow-y: auto; + min-height: 100vh; + box-sizing: border-box; form { margin-bottom: 20px; @@ -44,32 +48,97 @@ } } - .project-list { - margin-top: 2rem; + // .project-list { + // display: grid; + // grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); + // gap: 1.5rem; + // margin-top: 2rem; + // padding-bottom: 3rem; + + // .project-item { + // background: #ffffff; + // border: 1px solid #e0e0e0; + // border-radius: 12px; + // padding: 1.5rem; + // box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05); + // transition: transform 0.2s ease, box-shadow 0.2s ease; + + // .project-meta { + // margin-bottom: 0.75rem; + + // strong { + // color: #34495e; + // } + // } + + // h4 { + // margin: 0.5rem 0; + // font-size: 1.2rem; + // color: #2d3436; + // } + + // p { + // margin: 0.25rem 0; + // color: #555; + // line-height: 1.4; + + // strong { + // color: #2d3436; + // } + // } + + // .action-buttons { + // display: flex; + // gap: 0.5rem; + // margin-top: 0.75rem; + + // button { + // background-color: #f4f4f4; + // border: 1px solid #ddd; + // border-radius: 6px; + // padding: 0.4rem 0.8rem; + // cursor: pointer; + // font-size: 0.9rem; + + // &:hover { + // background-color: #e9ecef; + // } + + // &:nth-child(1) { + // color: #2c3e50; + // } + + // &:nth-child(2) { + // color: #c0392b; + // } + + // &:nth-child(3) { + // color: #16a085; + // } + // } + // } + // } + // } - h3 { - color: #4a90e2; - } + .project-list { + display: grid; + grid-template-columns: repeat(3, 1fr); // exactly 2 columns + gap: 1.5rem; + margin-top: 2rem; + padding-bottom: 3rem; .project-item { background: #ffffff; border: 1px solid #e0e0e0; border-radius: 12px; padding: 1.5rem; - margin-bottom: 1.5rem; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05); transition: transform 0.2s ease, box-shadow 0.2s ease; - - // &:hover { - // transform: translateY(-2px); - // box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08); - // } + overflow-wrap: break-word; + box-shadow: rgb(211, 0, 197) 0px 0px 15px, rgb(255, 42, 109) 0px 0px 25px; .project-meta { - justify-content: space-between; - align-items: center; margin-bottom: 0.75rem; - flex-wrap: wrap; strong { color: #34495e; @@ -104,7 +173,6 @@ padding: 0.4rem 0.8rem; cursor: pointer; font-size: 0.9rem; - transition: background-color 0.2s ease; &:hover { background-color: #e9ecef; @@ -126,6 +194,7 @@ } } + .modal-overlay { position: fixed; @@ -138,6 +207,7 @@ align-items: center; justify-content: center; z-index: 1000; + overflow: hidden; } .modal { @@ -148,6 +218,7 @@ width: 100%; box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15); animation: fadeIn 0.3s ease; + overflow: auto; } .modal h3 { From 28dd929927d2c7091a4a6fb3b1478a35505b0546 Mon Sep 17 00:00:00 2001 From: JBB0807 <104856796+JBB0807@users.noreply.github.com> Date: Fri, 2 May 2025 15:07:05 -0700 Subject: [PATCH 6/8] working login for students and logout --- src/pages/SignIn.jsx | 42 ++++++++++++++++++++++++++++++------------ src/pages/SignUp.jsx | 4 ++-- 2 files changed, 32 insertions(+), 14 deletions(-) diff --git a/src/pages/SignIn.jsx b/src/pages/SignIn.jsx index 9976eb5..a404843 100644 --- a/src/pages/SignIn.jsx +++ b/src/pages/SignIn.jsx @@ -3,7 +3,7 @@ import "@fortawesome/fontawesome-free/css/all.min.css"; function SignInForm() { const [state, setState] = React.useState({ - email: "", + assignmentID: "", password: "", }); const handleChange = (evt) => { @@ -17,15 +17,33 @@ function SignInForm() { const handleOnSubmit = (evt) => { evt.preventDefault(); - const { email, password } = state; - alert(`You are login with email: ${email} and password: ${password}`); + const { assignmentId, password } = state; + console.log(`You are loggind in with email: ${assignmentId} and password: ${password}`); - for (const key in state) { - setState({ - ...state, - [key]: "", + console.log("Submitting login request with state:", state); + fetch("http://localhost:8080/auth/student/login", { + method: "POST", + headers: { + "Content-Type": "application/json", + }, + body: JSON.stringify(state), + credentials: "include", + }) + .then((response) => { + console.log("Received response:", response); + if (!response.ok) { + throw new Error("Network response was not ok"); + } + return response.json(); + }) + .then((data) => { + console.log("Success:", data); + window.location.href = "/"; + }) + .catch((error) => { + console.error("Error occurred during login:", error); + alert("Login failed!"); }); - } }; return ( @@ -39,10 +57,10 @@ function SignInForm() {
*/} { evt.preventDefault(); - const { name, email, password } = state; + const { assignmentID, password } = state; alert( - `You are signed in with name: ${name} email: ${email} and password: ${password}` + `You are signed in with assignmentID: ${assignmentID} and password: ${password}` ); for (const key in state) { From 00c14f4eebf47e484e8ff693b044bf80714b2622 Mon Sep 17 00:00:00 2001 From: JBB0807 <104856796+JBB0807@users.noreply.github.com> Date: Fri, 2 May 2025 17:20:38 -0700 Subject: [PATCH 7/8] convert endpoint urls to env variables --- .env | 4 ++-- src/components/Navbar.jsx | 4 +++- src/pages/SignIn.jsx | 4 +++- src/pages/SignUp.jsx | 2 +- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.env b/.env index 0d0092a..7dc9c2c 100644 --- a/.env +++ b/.env @@ -1,2 +1,2 @@ -VITE_AUTH_URL="http://localhost:8080/auth/google" -#VITE_AUTH_URL="https://byte-camp-auth-service.fly.dev/auth/google" \ No newline at end of file +VITE_AUTH_URL="http://localhost:8080" +#VITE_AUTH_URL="https://byte-camp-auth-service.fly.dev" \ No newline at end of file diff --git a/src/components/Navbar.jsx b/src/components/Navbar.jsx index 0a011b4..02b1e5e 100644 --- a/src/components/Navbar.jsx +++ b/src/components/Navbar.jsx @@ -3,6 +3,8 @@ import "../scss/styles.scss"; import "../scss/components/_navbar.scss"; import { Link } from "react-router-dom"; +const authUrl = import.meta.env.VITE_AUTH_URL; + const Navbar = () => { const [glitchEffect, setGlitchEffect] = useState(false); const [activeLink, setActiveLink] = useState("/"); @@ -37,7 +39,7 @@ const Navbar = () => { document.addEventListener("mousedown", handleClickOutside); async function fetchUser() { - const res = await fetch("http://localhost:8080/auth/current_user", { + const res = await fetch(`${authUrl}/auth/current_user`, { credentials: "include", // very important }); if (res.ok) { diff --git a/src/pages/SignIn.jsx b/src/pages/SignIn.jsx index a404843..ff2372e 100644 --- a/src/pages/SignIn.jsx +++ b/src/pages/SignIn.jsx @@ -1,6 +1,8 @@ import React from "react"; import "@fortawesome/fontawesome-free/css/all.min.css"; +const authUrl = import.meta.env.VITE_AUTH_URL; + function SignInForm() { const [state, setState] = React.useState({ assignmentID: "", @@ -21,7 +23,7 @@ function SignInForm() { console.log(`You are loggind in with email: ${assignmentId} and password: ${password}`); console.log("Submitting login request with state:", state); - fetch("http://localhost:8080/auth/student/login", { + fetch(`${authUrl}/auth/student/login`, { method: "POST", headers: { "Content-Type": "application/json", diff --git a/src/pages/SignUp.jsx b/src/pages/SignUp.jsx index cb9d445..9f6804b 100644 --- a/src/pages/SignUp.jsx +++ b/src/pages/SignUp.jsx @@ -34,7 +34,7 @@ function SignUpForm() { const googleAuth = () => { - window.open(authUrl, "_self"); + window.open(`${authUrl}/auth/google`, "_self"); }; return ( From 12f81acbf25b4338897c540ec6b6d98c5b5db6c8 Mon Sep 17 00:00:00 2001 From: JBB0807 <104856796+JBB0807@users.noreply.github.com> Date: Fri, 2 May 2025 18:34:20 -0700 Subject: [PATCH 8/8] bug fixes for fly server --- .env | 4 ++-- .env.development | 2 ++ src/components/Navbar.jsx | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) create mode 100644 .env.development diff --git a/.env b/.env index 7dc9c2c..ddf3a43 100644 --- a/.env +++ b/.env @@ -1,2 +1,2 @@ -VITE_AUTH_URL="http://localhost:8080" -#VITE_AUTH_URL="https://byte-camp-auth-service.fly.dev" \ No newline at end of file +#VITE_AUTH_URL="http://localhost:8080" +VITE_AUTH_URL="https://byte-camp-auth-service.fly.dev" \ No newline at end of file diff --git a/.env.development b/.env.development new file mode 100644 index 0000000..7dc9c2c --- /dev/null +++ b/.env.development @@ -0,0 +1,2 @@ +VITE_AUTH_URL="http://localhost:8080" +#VITE_AUTH_URL="https://byte-camp-auth-service.fly.dev" \ No newline at end of file diff --git a/src/components/Navbar.jsx b/src/components/Navbar.jsx index 02b1e5e..537cb27 100644 --- a/src/components/Navbar.jsx +++ b/src/components/Navbar.jsx @@ -13,7 +13,7 @@ const Navbar = () => { const menuRef = useRef(null); async function handleLogout() { - window.open("http://localhost:8080/auth/logout", "_self"); + window.open(`${authUrl}/auth/logout`, "_self"); }; useEffect(() => {