Skip to content

Commit

Permalink
Navbar is sticky now. Fixed issue where things were being drawn over …
Browse files Browse the repository at this point in the history
…the navbar
  • Loading branch information
Kasra-G committed Dec 1, 2023
1 parent 809e56f commit fcb55df
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 43 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -118,4 +118,6 @@ dist
firestore*

# VS Code Configuration
.vscode
.vscode

.idea/
71 changes: 29 additions & 42 deletions projects/mybyte/components/navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ const Navbar = ({ children }: { children: React.ReactNode }) => {
" overflow-y-auto font-inter"
}
>
<nav className="bg-white border-gray-200 shadow-md">
<nav className="bg-white border-gray-200 shadow-md sticky top-0 z-10">
<div className="flex flex-wrap items-center justify-between mx-auto py-6">
<Link href={!user.uid ? "/" : "/dashboard"}>
<Link href={!user.id ? "/" : "/dashboard"}>
<span className="font-semibold uppercase text-xl tracking-5px px-5 hover:text-red-500 transition">
UGAHacks
</span>
Expand Down Expand Up @@ -139,9 +139,9 @@ const Navbar = ({ children }: { children: React.ReactNode }) => {
})
) : (
<>
{userInfo.first_name != null &&
userInfo.first_name != "" ? (
<li>
<li>
{userInfo.first_name != null &&
userInfo.first_name != "" ? (
<Link href="/dashboard">
<span
className={
Expand All @@ -153,12 +153,11 @@ const Navbar = ({ children }: { children: React.ReactNode }) => {
Dashboard
</span>
</Link>
</li>
) : null}

{userInfo.first_name != null &&
userInfo.first_name != "" ? (
<li>
) : null}
</li>
<li>
{userInfo.first_name != null &&
userInfo.first_name != "" ? (
<Link href="/team">
<span
className={
Expand All @@ -170,17 +169,15 @@ const Navbar = ({ children }: { children: React.ReactNode }) => {
Team
</span>
</Link>
</li>
) : null}

{/* TODO: Why are we doing the first_name check */}

{userInfo.first_name != null &&
userInfo.first_name != "" &&
user_type !== null &&
user_type !== undefined &&
user_type == "service_writer" ? (
<li>
) : null}
</li>
<li>
{/* TODO: Why are we doing the first_name check */}
{userInfo.first_name != null &&
userInfo.first_name != "" &&
user_type !== null &&
user_type !== undefined &&
user_type == "service_writer" ? (
<Link href="/qrRead">
<span
className={
Expand All @@ -192,13 +189,12 @@ const Navbar = ({ children }: { children: React.ReactNode }) => {
Scanner
</span>
</Link>
</li>
) : null}

{/* TODO: why are we checking first_name? */}
{userInfo.first_name != null &&
userInfo.first_name != "" ? (
<li>
) : null}
</li>
<li>
{/* TODO: why are we checking first_name? */}
{userInfo.first_name != null &&
userInfo.first_name != "" ? (
<Link href="/insertDevPost">
<span
className={
Expand All @@ -210,9 +206,8 @@ const Navbar = ({ children }: { children: React.ReactNode }) => {
Submit Devpost Link
</span>
</Link>
</li>
) : null}

) : null}
</li>
<li>
<a onClick={handleLogout} className={nonSelectedStyles}>
Logout
Expand All @@ -225,16 +220,8 @@ const Navbar = ({ children }: { children: React.ReactNode }) => {
</div>
</div>
</nav>
<div
className={
router.asPath === "/register"
? "fixed"
: "font-inter h-[calc(100%-168px)] md:h-[calc(100%-76px)]"
}
>
<div id={router.asPath !== "/register" ? "acdweafadaefd" : ""}>
{children}
</div>
<div className="font-inter h-[calc(100%-168px)] md:h-[calc(100%-76px)]">
<div id="acdweafadaefd">{children}</div>
</div>
</div>
</div>
Expand Down

0 comments on commit fcb55df

Please sign in to comment.