Skip to content

Commit

Permalink
chore: archive website banner (#288)
Browse files Browse the repository at this point in the history
  • Loading branch information
skylarmb authored Oct 23, 2024
1 parent 21eca76 commit b315bb1
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 25 deletions.
3 changes: 2 additions & 1 deletion website/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ const Page = () => {
}
trafficFlowContent={
<>
Run it all in a single cluster with Kardinal&apos;s <em>open-source</em>, hyper-lightweight multitenancy framework.
Run it all in a single cluster with Kardinal&apos;s{" "}
<em>open-source</em>, hyper-lightweight multitenancy framework.
</>
}
videoStepperHeading={
Expand Down
33 changes: 9 additions & 24 deletions website/components/Banner.tsx
Original file line number Diff line number Diff line change
@@ -1,40 +1,25 @@
"use client";

import { useEffect, useState } from "react";
import { BiX } from "react-icons/bi";
import styled from "styled-components";

import Button from "@/components/Button";
import Text from "@/components/Text";
import { mobile } from "@/constants/breakpoints";
import { useModal } from "@/context/ModalContext";

const Banner = () => {
const { toggleModal } = useModal();
const [bannerIsDismissed, setBannerIsDismissed] = useState(
typeof window !== "undefined" // client-side only
? localStorage.getItem("bannerIsDismissed") === "true"
: false,
);
useEffect(() => {
if (bannerIsDismissed) {
localStorage.setItem("bannerIsDismissed", "true");
}
}, [bannerIsDismissed]);

if (bannerIsDismissed) return null;
return (
<S.Banner>
<S.BannerText>
Kardinal is still in build mode - please{" "}
<S.CTAButton onClick={toggleModal} analyticsId="banner_join_waitlist">
join the beta
</S.CTAButton>{" "}
to be alerted when we launch
<b>Disclaimer:</b> The Kardinal project is no longer maintained. The
archived source code is still available on{" "}
<a
style={{ textDecoration: "underline" }}
href="https://github.com/kurtosis-tech/kardinak"
>
Github
</a>
.
</S.BannerText>
<S.CloseButton onClick={() => setBannerIsDismissed(true)}>
<BiX size={24} />
</S.CloseButton>
</S.Banner>
);
};
Expand Down
2 changes: 2 additions & 0 deletions website/components/Nav/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import Link from "next/link";
import { BiMenu, BiX } from "react-icons/bi";
import styled from "styled-components";

import Banner from "@/components/Banner";
import { ButtonTertiary } from "@/components/Button";
import Sparkles from "@/components/icons/Sparkles";
import ResponsiveNav from "@/components/ResponsiveNav";
Expand Down Expand Up @@ -67,6 +68,7 @@ const Nav = () => {
const { toggleNav, isNavOpen } = useModal();
return (
<S.Nav>
<Banner />
<S.Container>
<S.Wordmark href={"/"}>
<S.LogoImage
Expand Down

0 comments on commit b315bb1

Please sign in to comment.