Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update banner copy and enable banner #710

Merged
merged 4 commits into from
Sep 19, 2023
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
2 changes: 1 addition & 1 deletion .github/workflows/website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
13 changes: 11 additions & 2 deletions src/components/Banner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,16 @@ type BannerProps = {
}

export function Banner({ children }: BannerProps) {
return process.env.SHOW_ANNOUNCEMENT_BANNER === 'true' ? (
const [hasMounted, setHasMounted] = React.useState(false)

React.useEffect(() => {
setHasMounted(true)
}, [])

if (!hasMounted) {
return null
}
return (
<Box
as="div"
py={1}
Expand All @@ -19,5 +28,5 @@ export function Banner({ children }: BannerProps) {
>
<Text variant="body2">{children}</Text>
</Box>
) : null
)
}
4 changes: 2 additions & 2 deletions src/components/header/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export function Header({ menuButtonVariant }: HeaderProps) {
return (
<>
<Banner>
Centrifuge is Everywhere. {' '}
Centrifuge Everywhere:{' '}
<Text
as="a"
style={{ textDecoration: 'underline' }}
Expand All @@ -30,7 +30,7 @@ export function Header({ menuButtonVariant }: HeaderProps) {
target="_blank"
variant="body2"
>
Read the press release.
Read the announcement
</Text>
</Banner>
<Root
Expand Down
Loading