Skip to content

Commit

Permalink
Hide floating donate button on the donation page (#4345)
Browse files Browse the repository at this point in the history
The user is already on the page we are linking to and it's easy to mistake it for the form submit button.
  • Loading branch information
rakyi authored Dec 20, 2024
1 parent 3fe21f5 commit 286627f
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions site/SiteTools.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,24 @@ const SITE_TOOLS_CLASS = "site-tools"

const SiteTools = () => {
const scrollDirection = useScrollDirection()
const isDonatePage = window.location.pathname === "/donate"

return (
<div
className={cx("hide-wrapper", {
hide: scrollDirection === ScrollDirection.Down,
})}
>
<a
className="prompt prompt-donate"
data-track-note="page_open_donate"
href="/donate"
>
<FontAwesomeIcon icon={faHeart} />
Donate
</a>
{!isDonatePage && (
<a
className="prompt prompt-donate"
data-track-note="page_open_donate"
href="/donate"
>
<FontAwesomeIcon icon={faHeart} />
Donate
</a>
)}
{/* <NewsletterSubscription
context={NewsletterSubscriptionContext.Floating}
/> */}
Expand Down

0 comments on commit 286627f

Please sign in to comment.