Skip to content

Commit

Permalink
Merge pull request #49 from hack-rpi/fix/replace-mlh-banner
Browse files Browse the repository at this point in the history
Re-added the MLH banner after mistakenly removing it
  • Loading branch information
CooperW824 authored Apr 22, 2024
2 parents 8c7d049 + 1a26e7f commit 690252b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion components/mlh-banner/mlh-banner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default function MlhBanner() {
id="mlh-trust-badge"
href="https://mlh.io/na?utm_source=na-hackathon&utm_medium=TrustBadge&utm_campaign=2024-season&utm_content=white"
target="_blank"
className="block max-w-[80] desktop:max-w-[100px] min-w-[60px] w-[10%] h-auto fixed right-[25px] desktop:right-[50px] top-0 z-[10000] "
className="block max-w-[80] desktop:max-w-[100px] min-w-[60px] w-[10%] h-auto fixed right-[25px] desktop:right-[75px] top-0 z-[10000] "
>
<NextImage
src="https://s3.amazonaws.com/logged-assets/trust-badge/2024/mlh-trust-badge-2024-white.svg"
Expand Down
3 changes: 3 additions & 0 deletions components/nav-bar/nav-bar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React, { useEffect, useState } from "react";
import DesktopNavBar from "./nav-bar-desktop";
import MobileNavBar from "./nav-bar-mobile";
import { links } from "@/types/nav-bar-links";
import MlhBanner from "../mlh-banner/mlh-banner";

export default function NavBar({ showOnScroll }: { showOnScroll: boolean }) {
const [showNav, setShowNav] = useState(false);
Expand Down Expand Up @@ -31,13 +32,15 @@ export default function NavBar({ showOnScroll }: { showOnScroll: boolean }) {
return (
<>
<MobileNavBar links={links} />
<MlhBanner />
</>
);

return (
<>
<div className={`${showOnScroll ? (showNav ? "top-0" : "-top-24") : "top-0"} fixed transition-all w-full z-10`}>
<DesktopNavBar links={links} />
<MlhBanner />
</div>
</>
);
Expand Down

0 comments on commit 690252b

Please sign in to comment.