From 4fdba4d22be5fe12cb47f20bff01f5805789e892 Mon Sep 17 00:00:00 2001 From: Joel Denning Date: Fri, 15 Nov 2024 16:54:20 -0700 Subject: [PATCH] Switch from Baseplate banner to single-spa-workshop banner --- src/theme/Footer/index.js | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/theme/Footer/index.js b/src/theme/Footer/index.js index 78d228bd5..e9b3c1c54 100644 --- a/src/theme/Footer/index.js +++ b/src/theme/Footer/index.js @@ -10,9 +10,9 @@ function Footer() { const { siteConfig = {} } = context; const { themeConfig = {} } = siteConfig; const { footer } = themeConfig; - const [showBaseplateBanner, setShowBaseplateBanner] = useState(() => + const [showWorkshopBanner, setShowWorkshopBanner] = useState(() => typeof localStorage !== "undefined" - ? localStorage.getItem("hide-baseplate-banner") !== "true" + ? localStorage.getItem("hide-workshop-banner") !== "true" : false, ); @@ -21,12 +21,12 @@ function Footer() { } useEffect(() => { - if (showBaseplateBanner) { - localStorage.removeItem("hide-baseplate-banner"); + if (showWorkshopBanner) { + localStorage.removeItem("hide-workshop-banner"); } else { - localStorage.setItem("hide-baseplate-banner", true); + localStorage.setItem("hide-workshop-banner", true); } - }, [showBaseplateBanner]); + }, [showWorkshopBanner]); const { copyright, links = [], logo } = footer; @@ -117,23 +117,23 @@ function Footer() { Originally developed at Canopy {copyright && copyright} - {showBaseplateBanner && ( + {showWorkshopBanner && (
-
Try Baseplate Cloud's official single-spa hosting!
+
Official single-spa educational courses!
setShowBaseplateBanner(false)} + onClick={() => setShowWorkshopBanner(false)} > Dismiss
- Baseplate Hosting + single-spa workshop