Skip to content

Commit

Permalink
remove ads slider and show only adshares
Browse files Browse the repository at this point in the history
  • Loading branch information
webdev403 committed Jul 3, 2023
1 parent c239737 commit 052d479
Show file tree
Hide file tree
Showing 17 changed files with 50 additions and 418 deletions.
2 changes: 0 additions & 2 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ import DualFarmUpdater from 'state/dualfarms/updater';
import CNTFarmUpdater from 'state/cnt/updater';
import SyrupUpdater from 'state/syrups/updater';
import AnalyticsUpdater from 'state/analytics/updater';
import AdsUpdater from 'state/ads/updater';
import 'slick-carousel/slick/slick.css';
import 'slick-carousel/slick/slick-theme.css';
import './i18n';
Expand Down Expand Up @@ -96,7 +95,6 @@ function Updaters() {
<DualFarmUpdater />
<SyrupUpdater />
<AnalyticsUpdater />
<AdsUpdater />
</>
);
}
Expand Down
80 changes: 0 additions & 80 deletions src/components/AdsSlider/AdsSlider.tsx

This file was deleted.

1 change: 0 additions & 1 deletion src/components/AdsSlider/index.ts

This file was deleted.

37 changes: 37 additions & 0 deletions src/components/Adshares/Adshares.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import React from 'react';
import { useMediaQuery, useTheme } from '@material-ui/core';

const AdsSlider: React.FC = () => {
const { breakpoints } = useTheme();
const isMobile = useMediaQuery(breakpoints.down('xs'));

return (
<div className='flex justify-center'>
{isMobile ? (
<div
className='_0cbf1c3d417e250a'
data-placement='0d0cfcd486a34feaa39ee2bf22c383ce'
style={{
width: 320,
height: 50,
display: 'inline-block',
margin: '0 auto',
}}
/>
) : (
<div
className='_0cbf1c3d417e250a'
data-placement='b694dc6256a744bdb31467ccec38def3'
style={{
width: 970,
height: 90,
display: 'inline-block',
margin: '0 auto',
}}
/>
)}
</div>
);
};

export default React.memo(AdsSlider);
1 change: 1 addition & 0 deletions src/components/Adshares/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default } from './Adshares';
2 changes: 1 addition & 1 deletion src/components/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ export { default as Header } from './Header';
export { default as Footer } from './Footer';
export { default as ListLogo } from './ListLogo';
export { default as AddressInput } from './AddressInput';
export { default as AdsSlider } from './AdsSlider';
export { default as Adshares } from './Adshares';
export { default as AreaChart } from './AreaChart';
export { default as BarChart } from './BarChart';
export { default as BetaWarningBanner } from './BetaWarningBanner';
Expand Down
4 changes: 2 additions & 2 deletions src/pages/AnalyticsPage/AnalyticsHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ import AnalyticsSearch from 'components/AnalyticsSearch';
import { shortenAddress } from 'utils';
import 'pages/styles/analytics.scss';
import { useTranslation } from 'react-i18next';
import AdsSlider from 'components/AdsSlider';
import VersionToggle from 'components/Toggle/VersionToggle';
import { getConfig } from 'config';
import { ChainId } from '@uniswap/sdk';
import { useActiveWeb3React, useAnalyticsVersion } from 'hooks';
import { useIsV2 } from 'state/application/hooks';
import { Adshares } from 'components';

interface AnalyticHeaderProps {
data?: any;
Expand Down Expand Up @@ -63,7 +63,7 @@ const AnalyticsHeader: React.FC<AnalyticHeaderProps> = ({
)}
</Box>
<Box maxWidth={isMobile ? '320px' : '1136px'} margin='0 auto 24px'>
<AdsSlider sort='analytics' />
<Adshares />
</Box>
<Box
mb={4}
Expand Down
7 changes: 2 additions & 5 deletions src/pages/DragonPage/DragonPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import DragonsLair from './DragonsLair';
import DragonsSyrup from './DragonsSyrup';
import 'pages/styles/dragon.scss';
import { useTranslation } from 'react-i18next';
import AdsSlider from 'components/AdsSlider';
import { Adshares } from 'components';
import { getConfig } from 'config';
import { useActiveWeb3React } from 'hooks';
import { ChainId } from '@uniswap/sdk';
Expand Down Expand Up @@ -82,9 +82,6 @@ const DragonPage: React.FC = () => {
<DragonsLair isNew={false} />
</Box>
)}
{/* <Box maxWidth={isMobile ? '320px' : '352px'} margin='16px auto 0'>
<AdsSlider sort='dragons' />
</Box> */}
</Grid>
<Grid item xs={12} sm={12} md={8}>
<Box className='dragonWrapper'>
Expand All @@ -104,7 +101,7 @@ const DragonPage: React.FC = () => {
maxWidth={isMobile ? '320px' : '1136px'}
margin='0 auto 24px'
>
<AdsSlider sort='analytics' />
<Adshares />
</Box>
</Grid>
</Grid>
Expand Down
4 changes: 2 additions & 2 deletions src/pages/FarmPage/FarmPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { useActiveWeb3React } from 'hooks';
import { GlobalConst } from 'constants/index';
import FarmRewards from './FarmRewards';
import FarmsList from './FarmsList';
import { AdsSlider, CustomSwitch } from 'components';
import { Adshares, CustomSwitch } from 'components';
import { useTranslation } from 'react-i18next';
import 'pages/styles/farm.scss';
import { useDefaultFarmList } from 'state/farms/hooks';
Expand Down Expand Up @@ -137,7 +137,7 @@ const FarmPage: React.FC = () => {
)}
</Box>
<Box maxWidth={isMobile ? '320px' : '1136px'} margin='0 auto 24px'>
<AdsSlider sort='analytics' />
<Adshares />
</Box>
{isV2 && v2 && (
<>
Expand Down
7 changes: 2 additions & 5 deletions src/pages/PoolsPage/PoolsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ import SupplyLiquidity from './SupplyLiquidity';
import { useTranslation } from 'react-i18next';
import 'pages/styles/pools.scss';
import VersionToggle from 'components/Toggle/VersionToggle';
import AdsSlider from 'components/AdsSlider';
import { useIsV2 } from 'state/application/hooks';
import { SupplyLiquidityV3 } from './v3/SupplyLiquidityV3';
import { getConfig } from '../../config/index';
import { useActiveWeb3React } from 'hooks';
import { ChainId } from '@uniswap/sdk';
import { GammaPairs } from 'constants/index';
import { Adshares } from 'components';
const YourLiquidityPools = lazy(() => import('./YourLiquidityPools'));
const MyLiquidityPoolsV3 = lazy(() => import('./v3/MyLiquidityPoolsV3'));
const MyGammaPoolsV3 = lazy(() => import('./v3/MyGammaPoolsV3'));
Expand Down Expand Up @@ -59,9 +59,6 @@ const PoolsPage: React.FC = () => {
<Box className='wrapper'>
{!isV2 ? <SupplyLiquidityV3 /> : <SupplyLiquidity />}
</Box>
{/* <Box maxWidth={isMobile ? '320px' : '352px'} margin='16px auto 0'>
<AdsSlider sort='pools' />
</Box> */}
</Grid>
<Grid item xs={12} sm={12} md={7}>
<Box className='wrapper'>
Expand All @@ -75,7 +72,7 @@ const PoolsPage: React.FC = () => {
</Grid>
</Grid>
<Box maxWidth={isMobile ? '320px' : '1136px'} margin='24px auto'>
<AdsSlider sort='analytics' />
<Adshares />
</Box>
</Box>
);
Expand Down
5 changes: 1 addition & 4 deletions src/pages/SwapPage/SwapDefaultMode.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Box, Divider, Grid } from '@material-ui/core';
import { NavigateBefore, NavigateNext } from '@material-ui/icons';
import { AdsSlider, SwapTokenDetailsHorizontal } from 'components';
import { SwapTokenDetailsHorizontal } from 'components';
import React, { useEffect, useState } from 'react';
import { useLocation } from 'react-router-dom';
import { SwapBuySellMiniWidget } from './BuySellWidget';
Expand Down Expand Up @@ -92,9 +92,6 @@ const SwapDefaultMode: React.FC<{
<Box className='wrapper'>
<SwapMain />
</Box>
{/* <Box sx={{ marginTop: '16px' }}>
<AdsSlider sort='swap' />
</Box> */}
</Grid>
<Grid item lg={4}>
<Grid container justifyContent='flex-start' spacing={2}>
Expand Down
5 changes: 2 additions & 3 deletions src/pages/SwapPage/SwapPage.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { Box, useMediaQuery, useTheme } from '@material-ui/core';
import { ChainId } from '@uniswap/sdk';
import { SettingsModal } from 'components';
import AdsSlider from 'components/AdsSlider';
import { Adshares, SettingsModal } from 'components';
import { useActiveWeb3React, useIsProMode } from 'hooks';
import 'pages/styles/swap.scss';
import React, { useEffect, useState } from 'react';
Expand Down Expand Up @@ -96,7 +95,7 @@ const SwapPage: React.FC = () => {
/>
)}
<Box maxWidth={isMobile ? '320px' : '1136px'} margin='24px auto'>
<AdsSlider sort='analytics' />
<Adshares />
</Box>
</Box>
);
Expand Down
24 changes: 0 additions & 24 deletions src/state/ads/actions.ts

This file was deleted.

70 changes: 0 additions & 70 deletions src/state/ads/hooks.ts

This file was deleted.

Loading

0 comments on commit 052d479

Please sign in to comment.