components APIs
- Header
- Button
- Layout
- Footer
- Text
- Box
- Card
- Table
- Loading
- Select
- Loader
- Toolbar
- Icon
- CodeInput
- BottomSheet
- InfoBlock
- LanguageToggle
- ProgressCircles
- Ripple
- Toggle
- Tag
- Input
- Paginator
- Filter
- AsyncSelect
- CatalogBigButton
- ReadMore
- ConditionalWrapper
- LastCheckedDisplay
- PriceLabel
- PageTitle
- CartTable
- CartFinalPriceTable
- LoadingSpin
- InfoModal
- ProductCard
- RecommendCoupon
- PriceVales
- NomalLayout
- Web3ReactManager
- Popups
- CurrencyInput
- TransactionErrorContent
- TransactionConfirmationModal
- ConfirmationModalContent
- DoubleCurrencyLogo
- CustomModal
- CurrencySearchModal
- CurrencyLogo
- NumericalInput
- Logo
- QuestionHelper
- ListLogo
- DataTable
- WalletModal
- CustomTable
- MinimalPositionCard
- RemoveLiquidityModal
- CustomTooltip
- ColoredSlider
- ToggleSwitch
- FormattedPriceImpact
- SettingsModal
- ConfirmSwapModal
- AdvancedSwapDetails
- AddressInput
- LineChart
- StakeSyrupModal
- AccountDetails
- BetaWarningBanner
- AreaChart
- ChartType
- TokensTable
- PairTable
- TopMovers
- BarChart
- TransactionsTable
- StakeQuickModal
- UnstakeQuickModal
- SyrupCard
- CustomMenu
- SearchInput
- CustomSwitch
- FarmCard
- BuyFiatModal
- MoonpayModal
- RewardSlider
- Swap
- AddLiquidity
- PoolFinderModal
- PoolPositionCard
- SwapTokenDetails
- SuperHeader
- GlobalStyles
- PrimaryButton
- SectionTitle
- Section
- AccentSection
- ChainSelection
- CoinSelection
- AddressSelection
- SendAction
- Buttons
- Content
- Particles
- IconButton
- NotSupported
- InputSearch
- RouteGuard
- SearchBar
- FileInput
- GovBanner
- AuthForm
- DomainDetails
- Subnav
- ColumnFilter
- ImportExport
- selectFilter
- TaggedArrayInput
- FacetFilter
- ButtonSingleLine
- TextMultiline
- ButtonSelect
- BottomSheetBehavior
- InfoButton
- BulletPointX
- BulletPointCheck
- Title
- LoadingIcon
- SelectFilterControls
- CORInputForm
- SdnInputForm
- Navbar
- HomeRoute
- AuthRoute
- DocumentDetails
- DocumentStepper
- AddGame
- Auth
- Effectiveness
- Export
- PokemonType
- Moves
- Member
- MoveSelector
- Type
- Natures
- Move
- PokeInfo
- Share
- Badges
- Status
- UpdateSW
- About
- Builder
- Calculator
- Changelog
- Import
- Pokestats
- Report
- Rules
- Settings
- Tracker
- DarkThemeProvider
- NotificationHandler
- Background
- Indicator
- StyledButton
- StyledText
- Illustration
- OnboardingSlider
- FlexList
- AppLayout
- ScrollableList
- Visualization
- DataSearch
- Region
- App
- CompareApiLegend
- CompareApiBreadcrumbs
- CompareApiLink
- CompareApiCard
- ExploreApiBreadcrumbs
- ExploreApiLink
- ExploreApiSearch
- ExploreApiConst
- ApiLoader
- RefreshButton
- Listing
- PriceModal
- ConfirmationModal
- Transition
- AutoComplete
- useInput
- Avatar
- Badge
- Breadcrumbs
- ButtonDropdown
- ButtonGroup
- Capacity
- Checkbox
- Code
- Collapse
- CssBaseline
- GeistProvider
- Description
- Display
- Divider
- Dot
- Drawer
- useModal
- Fieldset
- Grid
- Image
- Keyboard
- Link
- Modal
- Note
- Page
- Pagination
- Popover
- Progress
- Radio
- Rating
- Slider
- Snippet
- Spacer
- Spinner
- Tabs
- Textarea
- Tooltip
- Tree
- useBodyScroll
- useClasses
- useClickAway
- useClipboard
- useCurrentState
- useKeyboard
- KeyMod
- KeyCode
- useMediaQuery
- useTabs
- useToasts
- User
- useTheme
- Themes
- GeistUIThemes
- useAllThemes
- CollapsableDialog
- Map
- IPForm
- IPMenu
- Container
- Parallax
- Nav
- SEO
- BlogNav
- ExtensionCard
- MenuComp
Other Related APIs
- react#useEffect
- react-router-dom#useHistory
- @material-ui/core#Typography
- @material-ui/core#Box
- @material-ui/core#Grid
- @material-ui/core#useMediaQuery
- @material-ui/core/styles#makeStyles
- @material-ui/core/styles#useTheme
- react-i18next#useTranslation
- utils#getEthPrice
- utils#getGlobalData
- components#TopMovers
components#RewardSlider TypeScript Examples
The following examples show how to use
components#RewardSlider.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: LandingPage.tsx From interface-v2 with GNU General Public License v3.0 | 4 votes |
LandingPage: React.FC = () => {
const classes = useStyles();
const { palette, breakpoints } = useTheme();
const mobileWindowSize = useMediaQuery(breakpoints.down('sm'));
const { t } = useTranslation();
const features = [
{
img: FeaturedSwap,
title: t('swapTokens'),
desc: t('featureTradeDesc'),
},
{
img: ProvideLiquidity,
title: t('supplyLiquidity'),
desc: t('featureLiquidityDesc'),
},
{
img: Rewards,
title: t('earndQUICK'),
desc: t('featureDepositDesc'),
},
{
img: DragonsLair,
title: t('dragonLair'),
desc: t('featureDragonDesc'),
},
{
img: BuyWithFiat,
title: t('buyWithFiat'),
desc: t('featureBuyFiatDesc'),
},
{
img: Analytics,
title: t('analytics'),
desc: t('featureAnalyticsDesc'),
},
];
const socialicons = [
{
link: 'https://www.reddit.com/r/QuickSwap/',
icon: <RedditIcon />,
title: 'Reddit',
},
{
link: 'https://discord.com/invite/XJTM7FV88Y',
icon: <DiscordIcon />,
title: 'Discord',
},
{
link: 'https://twitter.com/QuickswapDEX',
icon: <TwitterIcon />,
title: 'Twitter',
},
{
link: 'https://quickswap-layer2.medium.com/',
icon: <MediumIcon />,
title: 'Medium',
},
{
link: 'https://www.youtube.com/channel/UCrPlF-DBwD-UzLFDzJ4Z5Fw',
icon: <YouTubeIcon />,
title: 'Youtube',
},
{
link: 'https://t.me/QuickSwapDEX',
icon: <TelegramIcon />,
title: 'Telegram',
},
{
link: 'https://www.coingecko.com/en/exchanges/quickswap',
icon: <CoingeckoIcon />,
title: 'CoinGecko',
},
];
const history = useHistory();
const { globalData, updateGlobalData } = useGlobalData();
useEffect(() => {
async function fetchGlobalData() {
const [newPrice, oneDayPrice] = await getEthPrice();
const newGlobalData = await getGlobalData(newPrice, oneDayPrice);
if (newGlobalData) {
updateGlobalData({ data: newGlobalData });
}
}
fetchGlobalData();
}, [updateGlobalData]);
return (
<div id='landing-page' style={{ width: '100%' }}>
<Box margin={mobileWindowSize ? '64px 0' : '100px 0 80px'}>
<HeroSection globalData={globalData} />
</Box>
<Box className={classes.tradingInfo} display='flex'>
<TradingInfo globalData={globalData} />
</Box>
<Box className={classes.smallCommunityContainer}>
{socialicons.map((val, ind) => (
<a
href={val.link}
target='_blank'
key={ind}
rel='noopener noreferrer'
>
<Box display='flex' mx={1.5}>
{val.icon}
</Box>
</a>
))}
</Box>
<Box mt={2} width={1}>
<TopMovers background={palette.background.paper} />
</Box>
<Box className={classes.quickInfo}>
<Typography style={{ fontSize: '24px' }}>
{t('quickInfoTitle')}
</Typography>
<img src={Motif} alt='Motif' />
</Box>
<SwapSection />
<Box className={classes.rewardsContainer}>
<Box maxWidth='480px' width='100%'>
<Typography variant='h4'>{t('earnRewardsbyDeposit')}</Typography>
<Typography style={{ marginTop: '20px' }}>
{t('depositLPTokensRewards')}
</Typography>
</Box>
<RewardSlider />
<Box
bgcolor={palette.secondary.dark}
color={palette.text.primary}
width={194}
height={48}
display='flex'
alignItems='center'
justifyContent='center'
borderRadius={24}
style={{ cursor: 'pointer' }}
onClick={() => {
history.push('/farm');
}}
>
<Typography variant='body1'>{t('seeAllPairs')}</Typography>
</Box>
</Box>
<BuyFiatSection />
<Box className={classes.featureContainer}>
<Box className={classes.featureHeading}>
<Typography variant='h3'>{t('features')}</Typography>
<Box className={classes.featureDivider} />
</Box>
<Grid container spacing={4}>
{features.map((val, index) => (
<Grid item container alignItems='center' sm={12} md={6} key={index}>
<img src={val.img} alt={val.title} />
<Box className='featureText'>
<Typography variant='h5'>{val.title}</Typography>
<Typography variant='body1'>{val.desc}</Typography>
</Box>
</Grid>
))}
</Grid>
</Box>
<Box className={classes.communityContainer}>
<Box className={classes.featureHeading}>
<Typography variant='h3'>{t('joinCommunity')}</Typography>
<Box className={classes.featureDivider} />
</Box>
<Box className='socialContent'>
{socialicons.map((val, ind) => (
<Box key={ind}>
<a href={val.link} target='_blank' rel='noopener noreferrer'>
{val.icon}
<Typography>{val.title}</Typography>
</a>
</Box>
))}
</Box>
</Box>
</div>
);
}