Skip to content
Open
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
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"notion-types": "^6.12.6",
"notion-utils": "^6.12.9",
"react": "17.0.2",
"react-cookie-consent": "^8.0.1",
"react-dom": "17.0.2",
"react-error-boundary": "^3.1.4",
"react-fast-marquee": "^1.3.1",
Expand Down
20 changes: 19 additions & 1 deletion pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import { IconCommunity, IconGlobe, IconTransaction } from "@shm/Icons";
import { Helmet } from "react-helmet";
import { relative } from "path";
import Head from "next/head";
import CookieConsent, { Cookies, getCookieConsentValue } from "react-cookie-consent";

const LandingPage = ({ news }: InferGetStaticPropsType<typeof getStaticProps>): React.ReactNode => {
const { t: pageTranslation } = useTranslation("page-home");
Expand All @@ -43,6 +44,10 @@ const LandingPage = ({ news }: InferGetStaticPropsType<typeof getStaticProps>):
{ Icon: IconTransaction, title: "est-transaction-cost" },
{ Icon: IconGlobe, title: "min-validators" },
];

const getCookieValue = () => {
console.log(getCookieConsentValue());
};
return (
<>
{/* Hero section */}
Expand Down Expand Up @@ -125,7 +130,20 @@ const LandingPage = ({ news }: InferGetStaticPropsType<typeof getStaticProps>):
</Box>
}
/>

<CookieConsent
onAccept={() => {
getCookieValue();
}}
enableDeclineButton
onDecline={() => {
alert("nay!");
}}
>
We value your privacy
<br />
We use cookies to enhance the user experience, serve personalised ads or content , and
analise our traffic. by clicking i Understand you consent to our use if cookies
</CookieConsent>
<SlidingStats stats={stats} />
<ReadWhitepaper />
<MoreAboutShardeum />
Expand Down