Skip to content

Commit

Permalink
Hide floating donate button on the donation page
Browse files Browse the repository at this point in the history
  • Loading branch information
rakyi committed Dec 20, 2024
1 parent 6205b1b commit f9a9fae
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 f9a9fae

Please sign in to comment.