From 177b7cae8bdb9bab8b5e71bd231924dbc07e5939 Mon Sep 17 00:00:00 2001 From: sophian Date: Tue, 19 Sep 2023 11:20:49 -0400 Subject: [PATCH 1/4] Update copy --- src/components/header/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/header/index.tsx b/src/components/header/index.tsx index eac6070e..c2e39817 100644 --- a/src/components/header/index.tsx +++ b/src/components/header/index.tsx @@ -21,7 +21,7 @@ export function Header({ menuButtonVariant }: HeaderProps) { return ( <> - Centrifuge is Everywhere. {' '} + Centrifuge Everywhere:{' '} - Read the press release. + Read the announcement Date: Tue, 19 Sep 2023 11:21:38 -0400 Subject: [PATCH 2/4] Enable enable banner --- .github/workflows/website.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/website.yml b/.github/workflows/website.yml index 4824a7f6..66e0dc45 100644 --- a/.github/workflows/website.yml +++ b/.github/workflows/website.yml @@ -62,7 +62,7 @@ jobs: - name: Build env: GATSBY_FUNCTIONS_URL: ${{ needs.prepare-deploy.outputs.function_URL }} - SHOW_ANNOUNCEMENT_BANNER: false + SHOW_ANNOUNCEMENT_BANNER: true run: | yarn build From 5d20486eef3ccff95d0fac2c4a98128043807760 Mon Sep 17 00:00:00 2001 From: sophian Date: Tue, 19 Sep 2023 11:50:55 -0400 Subject: [PATCH 3/4] Remove env variable --- src/components/Banner.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/Banner.tsx b/src/components/Banner.tsx index 848362c5..39e8320b 100644 --- a/src/components/Banner.tsx +++ b/src/components/Banner.tsx @@ -7,7 +7,7 @@ type BannerProps = { } export function Banner({ children }: BannerProps) { - return process.env.SHOW_ANNOUNCEMENT_BANNER === 'true' ? ( + return ( {children} - ) : null + ) } From 24a28cca391fea3ca34cd4631bbdc1c0bb3fd179 Mon Sep 17 00:00:00 2001 From: sophian Date: Tue, 19 Sep 2023 12:16:30 -0400 Subject: [PATCH 4/4] Attempt to load Banner on client side only --- src/components/Banner.tsx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/components/Banner.tsx b/src/components/Banner.tsx index 39e8320b..439b5f20 100644 --- a/src/components/Banner.tsx +++ b/src/components/Banner.tsx @@ -7,6 +7,15 @@ type BannerProps = { } export function Banner({ children }: BannerProps) { + const [hasMounted, setHasMounted] = React.useState(false) + + React.useEffect(() => { + setHasMounted(true) + }, []) + + if (!hasMounted) { + return null + } return (