Skip to content

Commit

Permalink
feat: update banner text, hide donate button on main page (#1005)
Browse files Browse the repository at this point in the history
edit banner text, hide donation button on home
  • Loading branch information
JoeKarow authored Jan 10, 2024
1 parent 124ee63 commit 7930c07
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
1 change: 1 addition & 0 deletions apps/app/public/locales/en/landingPage.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"banner": {
"donate": "Help keep InReach free for everyone. <DonateLink>Donate now!</DonateLink> 💝",
"redesign": "Read about the launch of the InReach App redesign on our blog. <Link>Learn more.</Link>"
},
"call-out": {
Expand Down
11 changes: 10 additions & 1 deletion apps/app/src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -186,14 +186,23 @@ const Home: NextPageWithoutGrid = () => {
<Box className={classes.banner}>
<Text variant={variants.Text.utility1white}>
<Trans
i18nKey='banner.redesign'
i18nKey='banner.donate'
ns='landingPage'
components={{
Link: (
<Link
external
variant={variants.Link.inheritStyle}
href='https://inreach.org/introducing-the-redesigned-inreach-app'
target='_blank'
></Link>
),
DonateLink: (
<Link
external
variant={variants.Link.inheritStyle}
href='https://inreach.kindful.com/embeds/9e692b4a-fcfc-46a2-9a0e-4f9b8b0bd37b'
target='_blank'
></Link>
),
}}
Expand Down
6 changes: 5 additions & 1 deletion packages/ui/components/core/Donate/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ export const DonateModal = () => {

const isSupportPage = router.pathname === '/support'
const showPopover = !isSupportPage && (opened || !showEmoji)
const isMainPage = router.pathname === '/'

return (
<>
Expand All @@ -96,7 +97,10 @@ export const DonateModal = () => {
zIndex={200}
>
<Popover.Target>
<Affix position={buttonPosition} style={{ display: isSupportPage ? 'none' : undefined }}>
<Affix
position={buttonPosition}
style={{ display: isSupportPage || isMainPage ? 'none' : undefined }}
>
<Button
className={cx(
// 'kindful-donate-btn',
Expand Down

0 comments on commit 7930c07

Please sign in to comment.