Skip to content

Commit

Permalink
Adjust homepage banners (#1047)
Browse files Browse the repository at this point in the history
* Update homepage banner

* Get rid of the other banners

* Create brown-bobcats-burn.md
  • Loading branch information
tiltom authored Nov 12, 2024
1 parent 2ef631b commit 58350fd
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 36 deletions.
5 changes: 5 additions & 0 deletions .changeset/brown-bobcats-burn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"frontend": patch
---

Adjust homepage banners
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { FC, useCallback } from 'react';
import React, { FC } from 'react';

import { t } from 'i18next';
import Carousel from 'react-multi-carousel';
Expand All @@ -13,17 +13,12 @@ import { LandingPromoCard } from './components/LandingPromoCard/LandingPromoCard

export const Banner: FC = () => {
const navigate = useNavigate();
const handleRunesClick = useCallback(() => {
window.open(
'https://sovryn.com/all-things-sovryn/bitcoin-runes-tokens',
'_blank',
);
}, []);

return (
<div className="w-full relative pb-16">
<Carousel
arrows={false}
draggable={true} // Needs to be true when we have more than 1 promo
draggable={false} // Needs to be true when we have more than 1 promo
partialVisible={false}
focusOnSelect={false}
responsive={{
Expand All @@ -37,52 +32,30 @@ export const Banner: FC = () => {
swipeable
className="static"
renderDotsOutside
showDots={true} // Needs to be true when we have more than 1 promo
autoPlay={true} // Needs to be true when we have more than 1 promo
showDots={false} // Needs to be true when we have more than 1 promo
autoPlay={false} // Needs to be true when we have more than 1 promo
dotListClass={styles.dot}
autoPlaySpeed={15000}
infinite
>
<LandingPromoCard
heading={t(
translations.landingPage.promotions.sovrynIsLiveOnBob.title,
)}
heading={t(translations.landingPage.promotions.bosLaunch.title)}
description={t(
translations.landingPage.promotions.sovrynIsLiveOnBob.description,
translations.landingPage.promotions.bosLaunch.description,
)}
actions={
<>
<Button
style={ButtonStyle.secondary}
size={ButtonSize.large}
text={t(
translations.landingPage.promotions.sovrynIsLiveOnBob.cta,
)}
onClick={() => navigate('/earn/market-making')}
text={t(translations.landingPage.promotions.bosLaunch.cta)}
onClick={() => navigate('/earn/staking')}
hrefExternal
/>
</>
}
className="border-primary"
/>
<LandingPromoCard
heading={t(translations.landingPage.promotions.runesBridge.title)}
description={t(
translations.landingPage.promotions.runesBridge.description,
)}
actions={
<>
<Button
style={ButtonStyle.secondary}
size={ButtonSize.large}
text={t(translations.landingPage.promotions.runesBridge.cta)}
onClick={handleRunesClick}
hrefExternal
/>
</>
}
className="border-sovryn-blue"
/>
</Carousel>
</div>
);
Expand Down
5 changes: 5 additions & 0 deletions apps/frontend/src/locales/en/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -561,6 +561,11 @@
"title": "Hello, BOB!",
"description": "The Sovryn DEX is now live on BOB. Enjoy passive yield, Spice, runes trading & more on the new chain.",
"cta": "Deposit in AMM"
},
"bosLaunch": {
"title": "Launching BOS!",
"description": "Sovryn to lead BitcoinOS launch & retain 10% of $BOS. $SOV stakers decide allocation.",
"cta": "Stake SOV"
}
},
"titleSection": {
Expand Down

0 comments on commit 58350fd

Please sign in to comment.