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

feat: update banner text, hide donate button on main page #1005

Merged
merged 1 commit into from
Jan 10, 2024
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
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
Loading