From 2ea4425230c2f8a75392a19f7c541e78b9543214 Mon Sep 17 00:00:00 2001 From: Juan Carlo Vieri Date: Mon, 11 Aug 2025 20:56:06 +0700 Subject: [PATCH 1/2] Changes to navbar --- src/app/components/NavBar.tsx | 28 +++++++++++++++++++++++++--- src/app/dashboard/profile/page.tsx | 26 +++++++++++++++++--------- 2 files changed, 42 insertions(+), 12 deletions(-) diff --git a/src/app/components/NavBar.tsx b/src/app/components/NavBar.tsx index 907e8b3..282b7bb 100644 --- a/src/app/components/NavBar.tsx +++ b/src/app/components/NavBar.tsx @@ -109,7 +109,7 @@ export default function NavBar() { Profile -
  • + {/*
  • Instructions -
  • -
  • +
  • */} + {/*
  • Room Bidding +
  • */} +
  • + + + + + + + + CCA Signup +
  • { const [isClient, setIsClient] = useState(false); const [roomBidInfo, setRoomBidInfo] = useState(); - const [ccaPoints, setCcaPoints] = useState<{ cca: string; points: number }[]>([]); + const [ccaPoints, setCcaPoints] = useState<{ cca: string; points: number }[]>( + [] + ); const [easterEgg, setEasterEgg] = useState(false); const [isLoading, setIsLoading] = useState(true); // New loading flag @@ -39,7 +41,9 @@ const ProfilePage = () => { const fetchRoomBidInfo = async () => { try { setIsLoading(true); // Set loading to true when fetch starts - const response = await axios.get(`${process.env.NEXT_PUBLIC_BACKEND_URL}/room/info`); + const response = await axios.get( + `${process.env.NEXT_PUBLIC_BACKEND_URL}/room/info` + ); if (response.data.success) { const roomBidInfo: RoomInfoType = { isEligible: response.data.data.info.isEligible, @@ -104,9 +108,9 @@ const ProfilePage = () => {

    Year {user.year}

    - + {/* Points: {roomBidInfo?.points || "Loading..."} - + */} {isSuperhero && ( Star Status @@ -123,12 +127,14 @@ const ProfilePage = () => {
    {/* CCA Points Distribution */} -
    + {/*

    Your Activities

    {isLoading ? ( -

    Loading your activities...

    +

    + Loading your activities... +

    ) : ccaPoints.length > 0 ? (
    {ccaPoints @@ -139,7 +145,9 @@ const ProfilePage = () => { className="group bg-gray-50 p-4 rounded-lg shadow-sm hover:shadow-md transition-all duration-300 transform hover:-translate-y-1" >
    - {cca.cca} + + {cca.cca} +
    {cca.points} @@ -160,7 +168,7 @@ const ProfilePage = () => { Shining bright like a star! 🌟

    )} -
    +
    */}
    {/* Hidden Bunny Easter Egg */} @@ -206,4 +214,4 @@ const customStyles = ` 50% { transform: rotate(3deg); } 100% { transform: rotate(-3deg); } } -`; \ No newline at end of file +`; From f35d71baf9a9dfb5ba95747d12a8f2111d0456ed Mon Sep 17 00:00:00 2001 From: Juan Carlo Vieri Date: Tue, 12 Aug 2025 09:35:22 +0700 Subject: [PATCH 2/2] Update profile page --- src/app/dashboard/profile/page.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/app/dashboard/profile/page.tsx b/src/app/dashboard/profile/page.tsx index 040b835..4d8431b 100644 --- a/src/app/dashboard/profile/page.tsx +++ b/src/app/dashboard/profile/page.tsx @@ -106,7 +106,9 @@ const ProfilePage = () => {

    {user.username} {isSuperhero && "✨"}

    -

    Year {user.year}

    + {/*

    Year {user.year}

    */} +

    Gender: {user.gender}

    +

    Room: {user.room}

    {/* Points: {roomBidInfo?.points || "Loading..."}