From 989cb4136057abf61f1e21e5ee8f7240376f0e75 Mon Sep 17 00:00:00 2001 From: Ronny Roland Date: Tue, 15 Oct 2024 15:18:27 -0600 Subject: [PATCH] Try again --- docs/content/snippets/deepbook.mdx | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/docs/content/snippets/deepbook.mdx b/docs/content/snippets/deepbook.mdx index aeedf5ed7435f..639f1052e8c37 100644 --- a/docs/content/snippets/deepbook.mdx +++ b/docs/content/snippets/deepbook.mdx @@ -1,18 +1,31 @@ +import React, { useState, useEffect } from "react"; import { useLocation } from "@docusaurus/router"; import useGlobalData from '@docusaurus/useGlobalData'; import Link from '@docusaurus/Link'; export function DBV() { + const [showNotice, setShowNotice] = useState(false); const location = useLocation(); const isV3 = location.pathname.includes("v3"); + useEffect(() => { + const currentDate = new Date(); + const endDate = new Date("2024-10-31T23:59:59"); + // Don't show after October; remove if still here + if (currentDate <= endDate) { + setShowNotice(true); + } else { + setShowNotice(false); + } + }, []); + function DBLink() { return DeepBook{isV3 ? "V2" : "V3"} docs } return ( <> -

DeepBookV3 is now available on Mainnet!

+ { showNotice ?

DeepBookV3 is now available on Mainnet!

: "" }

This documentation is for version {isV3 ? "3" : "2"} of DeepBook. For documentation on version {isV3 ? "2" : "3"} of DeepBook, see .