From 18528ff1b18db7aace597439c569811d110f9718 Mon Sep 17 00:00:00 2001 From: George Fang <26337405+Spazzinq@users.noreply.github.com> Date: Tue, 12 Nov 2024 21:54:20 -0500 Subject: [PATCH] Fix navbar --- .github/workflows/main.yml | 3 +- .github/workflows/node.js.yml | 2 +- README.md | 2 +- components/navbar.tsx | 225 +++++++++++++++------------------- docker-compose.debug.yml | 2 +- 5 files changed, 103 insertions(+), 131 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2db4d62..d939c47 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,5 +1,4 @@ -# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node -# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs +# Force push code to GitLab for deployment name: Mirror diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 942805b..82094f0 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -5,7 +5,7 @@ name: Node.js CI on: push: - branches: [ "main", "dcrepublic-dev", "v6ctor-dev"] + branches: ["main", "dcrepublic-dev", "v6ctor-dev"] jobs: build: diff --git a/README.md b/README.md index 4ea97c2..72972ff 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,7 @@ go mod tidy ``` ```bash -go run main.go -semester=[spring|fall] -year=[202x] #defautl is fall 2024 +go run main.go -semester=spring -year=2025 # Change to semester of choice ``` diff --git a/components/navbar.tsx b/components/navbar.tsx index 397508f..a1ab752 100644 --- a/components/navbar.tsx +++ b/components/navbar.tsx @@ -18,66 +18,33 @@ import { DropdownItem, } from "@nextui-org/dropdown"; import { Link } from "@nextui-org/link"; -import { Spacer } from "@nextui-org/spacer"; import NextLink from "next/link"; import { usePathname } from "next/navigation"; import { button as buttonStyles } from "@nextui-org/theme"; import InputIcon from "@mui/icons-material/Input"; +import AccountCircleIcon from "@mui/icons-material/AccountCircle"; import axios from "axios"; import { siteConfig } from "../config/site"; import { ThemeSwitch } from "../components/theme-switch"; import { title } from "../components/primitives"; +import { Button } from "@nextui-org/button"; export const Navbar = (props: any) => { const pathname = usePathname(); const { data: session, status } = useSession(); - let authenticated; - let loginLink: any; - let adminDashLink: any; - let nameButton; - - if (props.hasOwnProperty("login")) { - loginLink = null; - nameButton = null; - } else { - if (status === "authenticated") { - authenticated = true; - axios - .post("/api/user", { - session: session, - }) - .then(function (response) { - //console.log(response); - }) - .catch(function (error) { - console.log(error); - }); - - loginLink = ( -