11import React , { FC , useMemo } from 'react' ;
22
33import { t } from 'i18next' ;
4+ import Carousel from 'react-multi-carousel' ;
45import { useNavigate } from 'react-router-dom' ;
56
67import { noop } from '@sovryn/ui' ;
@@ -12,9 +13,11 @@ import borrowSovryn from '../../../../../assets/images/QuickLaunch/Borrow with S
1213import comingSoon from '../../../../../assets/images/QuickLaunch/Coming soon.svg' ;
1314import depositAMM from '../../../../../assets/images/QuickLaunch/Deposit in AMM.svg' ;
1415import lendDLLR from '../../../../../assets/images/QuickLaunch/Lend DLLR.svg' ;
16+ import originsLaunch from '../../../../../assets/images/QuickLaunch/Origins Launch.svg' ;
1517import passiveYield from '../../../../../assets/images/QuickLaunch/Passive yield.svg' ;
1618import stakeSOV from '../../../../../assets/images/QuickLaunch/Stake SOV.svg' ;
1719import tradeRunes from '../../../../../assets/images/QuickLaunch/Trade Runes.svg' ;
20+ import { LAUNCHPAD_LINKS } from '../../../../../constants/links' ;
1821import { useCurrentChain } from '../../../../../hooks/useChainStore' ;
1922import { translations } from '../../../../../locales/i18n' ;
2023import { COMMON_SYMBOLS } from '../../../../../utils/asset' ;
@@ -23,6 +26,7 @@ import { formatValue } from '../../../../../utils/math';
2326import { useGetNextSupplyInterestRate } from '../../../LendPage/hooks/useGetNextSupplyInterestRate' ;
2427import { useGetReturnRates } from '../../../MarketMakingPage/hooks/useGetReturnRates' ;
2528import { useGetStakingStatistics } from '../../../StakePage/components/StakingStatistics/hooks/useGetStakingStatistics' ;
29+ import styles from './QuickLaunch.module.css' ;
2630
2731const pageTranslations = translations . landingPage ;
2832
@@ -46,6 +50,19 @@ export const QuickLaunch: FC = () => {
4650
4751 const options = useMemo (
4852 ( ) => [
53+ {
54+ title : t ( pageTranslations . quickLaunch . originsLaunchpad . title , {
55+ amount : formatValue ( maxStakingApr , 2 ) ,
56+ } ) ,
57+ description : t (
58+ pageTranslations . quickLaunch . originsLaunchpad . description ,
59+ ) ,
60+ action : t ( pageTranslations . quickLaunch . originsLaunchpad . action ) ,
61+ href : LAUNCHPAD_LINKS . ORIGINS ,
62+ url : noop ,
63+ backgroundImage : originsLaunch ,
64+ chains : [ Chains . RSK ] ,
65+ } ,
4966 {
5067 title : t ( pageTranslations . quickLaunch . stake . title , {
5168 amount : formatValue ( maxStakingApr , 2 ) ,
@@ -130,19 +147,59 @@ export const QuickLaunch: FC = () => {
130147 } , [ options , chainId ] ) ;
131148
132149 return (
133- < div className = "bg-gray-80 rounded min-h-72 md:p-6 p-4 sm:mb-14 mb-10 grid md:grid-cols-2 xl:grid-cols-4 md:gap-6 gap-4" >
134- { filteredOptions . map ( ( option , index ) => (
135- < CTA
136- key = { index }
137- index = { index }
138- backgroundImage = { option . backgroundImage }
139- title = { option . title }
140- description = { option . description }
141- action = { option . action }
142- navigateTo = { option . url }
143- disableCTA = { option . disable }
144- />
145- ) ) }
150+ < div className = "bg-gray-80 rounded min-h-72 md:p-6 p-4 md:px-3 md:pb-16 sm:mb-14 mb-10 relative w-full" >
151+ < Carousel
152+ arrows = { false }
153+ draggable
154+ partialVisible = { false }
155+ focusOnSelect = { false }
156+ responsive = { {
157+ superLargeDesktop : {
158+ breakpoint : { max : 4000 , min : 3000 } ,
159+ items : 4 ,
160+ slidesToSlide : 4 ,
161+ } ,
162+ desktop : {
163+ breakpoint : { max : 3000 , min : 1280 } ,
164+ items : 4 ,
165+ slidesToSlide : 4 ,
166+ } ,
167+ tablet : {
168+ breakpoint : { max : 1280 , min : 768 } ,
169+ items : 3 ,
170+ slidesToSlide : 3 ,
171+ } ,
172+ mobile : {
173+ breakpoint : { max : 768 , min : 0 } ,
174+ items : 1 ,
175+ slidesToSlide : 1 ,
176+ } ,
177+ } }
178+ minimumTouchDrag = { 80 }
179+ swipeable
180+ className = "static"
181+ renderDotsOutside
182+ showDots
183+ itemClass = "px-3"
184+ autoPlay = { false }
185+ dotListClass = { styles . dot }
186+ autoPlaySpeed = { 15000 }
187+ infinite = { false }
188+ >
189+ { filteredOptions . map ( ( option , index ) => (
190+ < CTA
191+ key = { index }
192+ index = { index }
193+ backgroundImage = { option . backgroundImage }
194+ title = { option . title }
195+ description = { option . description }
196+ action = { option . action }
197+ href = { option . href }
198+ navigateTo = { option . url }
199+ disableCTA = { option . disable }
200+ />
201+ ) ) }
202+ </ Carousel >
146203 </ div >
147204 ) ;
148205} ;
0 commit comments