Skip to content
This repository has been archived by the owner on Jan 9, 2025. It is now read-only.

chore: archive website banner #288

Merged
merged 1 commit into from
Oct 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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