Skip to content

Commit

Permalink
Merge pull request #636 from Giveth/develop
Browse files Browse the repository at this point in the history
Release 2.0.5
  • Loading branch information
mateodaza authored Apr 28, 2022
2 parents 3366145 + 2ed2314 commit e006f8e
Show file tree
Hide file tree
Showing 24 changed files with 656 additions and 333 deletions.
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,13 @@
"@ethersproject/providers": "^5.5.0",
"@ethersproject/units": "^5.5.0",
"@giveth/ui-design-system": "^1.8.3",
"@gnosis.pm/safe-apps-web3-react": "^1.3.0",
"@sentry/nextjs": "^6.19.3",
"@toruslabs/torus-embed": "^1.20.2",
"@uniswap/v3-sdk": "^3.6.2-optimism-regenesis",
"@web3-react/core": "^6.1.9",
"@web3-react/injected-connector": "^6.0.7",
"@web3-react/walletconnect-connector": "^6.2.8",
"@web3-react/walletconnect-connector": "^6.2.13",
"apollo-upload-client": "^16.0.0",
"axios": "^0.25.0",
"bignumber.js": "^9.0.1",
Expand All @@ -35,6 +36,7 @@
"lodash.debounce": "^4.0.8",
"lodash.isequal": "^4.5.0",
"next": "^12.1.4",
"nprogress": "^0.2.0",
"quill": "^1.3.7",
"quill-emoji": "^0.2.0",
"quill-image-drop-and-paste": "^1.2.10",
Expand Down Expand Up @@ -62,6 +64,7 @@
"@types/lodash.debounce": "^4.0.6",
"@types/lodash.isequal": "^4.5.5",
"@types/node": "16.11.6",
"@types/nprogress": "^0.2.0",
"@types/react": "17.0.34",
"@types/react-custom-scrollbars": "^4.0.9",
"@types/react-dom": "^17.0.11",
Expand Down
25 changes: 24 additions & 1 deletion pages/_app.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import React from 'react';
import React, { useEffect } from 'react';
import Head from 'next/head';
import type { AppProps } from 'next/app';
import { Toaster } from 'react-hot-toast';
import { Web3ReactProvider } from '@web3-react/core';
import { ApolloProvider } from '@apollo/client';
import { ExternalProvider, Web3Provider } from '@ethersproject/providers';
import NProgress from 'nprogress';

import { NftsProvider } from '@/context/positions.context';
import { TokenDistroProvider } from '@/context/tokenDistro.context';
Expand All @@ -18,14 +19,36 @@ import { HeaderWrapper } from '@/components/Header/HeaderWrapper';
import { FooterWrapper } from '@/components/Footer/FooterWrapper';

import '../styles/globals.css';
import { useRouter } from 'next/router';

function getLibrary(provider: ExternalProvider) {
return new Web3Provider(provider);
}

function MyApp({ Component, pageProps }: AppProps) {
const router = useRouter();
const apolloClient = useApollo(pageProps);

useEffect(() => {
const handleStart = (url: string) => {
console.log(`Loading: ${url}`);
NProgress.start();
};
const handleStop = () => {
NProgress.done();
};

router.events.on('routeChangeStart', handleStart);
router.events.on('routeChangeComplete', handleStop);
router.events.on('routeChangeError', handleStop);

return () => {
router.events.off('routeChangeStart', handleStart);
router.events.off('routeChangeComplete', handleStop);
router.events.off('routeChangeError', handleStop);
};
}, [router]);

return (
<>
<Head>
Expand Down
10 changes: 5 additions & 5 deletions src/components/homeTabs/GIVfarm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import { BigNumber } from 'bignumber.js';
import { constants } from 'ethers';
import { useTokenDistro } from '@/context/tokenDistro.context';
import { useFarms } from '@/context/farm.context';
import { TopInnerContainer, ExtLink, ExtLinkRow } from './commons';
import { TopInnerContainer, ExtLinkRow } from './commons';
import { useWeb3React } from '@web3-react/core';
import { GIVfrens } from '@/components/GIVfrens';
import { givEconomySupportedNetworks } from '@/lib/constants/constants';
Expand Down Expand Up @@ -124,18 +124,18 @@ export const TabGIVfarmBottom = () => {
<Flex alignItems='center' gap='24px' wrap={1}>
<NetworkSelector />
<ExtLinkRow alignItems='center'>
<ExtLink
<GLink
size='Big'
target='_blank'
rel='noreferrer'
href='https://omni.xdaichain.com/bridge'
>
Bridge your GIV
</ExtLink>
</GLink>
<IconExternalLink />
</ExtLinkRow>
<ExtLinkRow alignItems='center'>
<ExtLink
<GLink
size='Big'
target='_blank'
rel='noreferrer'
Expand All @@ -146,7 +146,7 @@ export const TabGIVfarmBottom = () => {
}
>
Buy GIV token
</ExtLink>
</GLink>
<IconExternalLink />
</ExtLinkRow>
<ContractRow>
Expand Down
8 changes: 8 additions & 0 deletions src/components/homeTabs/Overview.sc.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
} from '@giveth/ui-design-system';
import { TopContainer } from './commons';
import { device, mediaQueries } from '@/lib/constants/constants';
import { Flex } from '../styled-components/Flex';

export const OverviewBottomContainer = styled.div`
background-image: url('/images/backgrounds/wave.svg');
Expand Down Expand Up @@ -140,3 +141,10 @@ export const VideoOverlay = styled.div<{ hidden: boolean }>`
background: rgba(0, 0, 0, 0.5);
}
`;

export const ClaimRow = styled(Flex)`
gap: 8px;
${mediaQueries.laptop} {
gap: 32px;
}
`;
35 changes: 29 additions & 6 deletions src/components/homeTabs/Overview.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Link from 'next/link';
import router from 'next/router';
import { Button } from '@giveth/ui-design-system';
import { Button, IconExternalLink, P } from '@giveth/ui-design-system';
import {
OverviewTopContainer,
PreTitle,
Expand All @@ -18,6 +18,7 @@ import {
DataBlockButton,
VideoContainer,
VideoOverlay,
ClaimRow,
} from './Overview.sc';
import { IconGIV } from '../Icons/GIV';
import config from '@/configuration';
Expand All @@ -26,6 +27,9 @@ import { Col, Container, Row } from '@/components/Grid';
import { useRef, useState } from 'react';
import Image from 'next/image';
import GivEconomyProjectCards from '../cards/GivEconomyProjectCards';
import { Flex } from '../styled-components/Flex';
import { ExtLinkCyan } from './commons';
import { useWeb3React } from '@web3-react/core';

export const TabOverviewTop = () => {
return (
Expand Down Expand Up @@ -88,6 +92,8 @@ export const TabOverviewVideo = () => {
};

export const TabOverviewBottom = () => {
const { chainId } = useWeb3React();

const goToClaim = () => {
router.push(Routes.Claim);
};
Expand Down Expand Up @@ -197,11 +203,28 @@ export const TabOverviewBottom = () => {
Connect your wallet or check an ethereum address to see
your rewards.
</ClaimCardQuote>
<ClaimCardButton
label='CLAIM YOUR GIV'
buttonType='primary'
onClick={goToClaim}
/>
<ClaimRow alignItems='center'>
<ClaimCardButton
label='CLAIM YOUR GIV'
buttonType='primary'
onClick={goToClaim}
/>
<Flex gap='8px'>
<P>Didn’t get the GIVdrop?</P>
<ExtLinkCyan
size='Big'
target='_blank'
rel='noreferrer'
href={
chainId === config.XDAI_NETWORK_NUMBER
? config.XDAI_CONFIG.GIV.BUY_LINK
: config.MAINNET_CONFIG.GIV.BUY_LINK
}
>
Buy GIV token <IconExternalLink />
</ExtLinkCyan>
</Flex>
</ClaimRow>
</ClaimCard>
<GivEconomyProjectCards />
</Container>
Expand Down
4 changes: 3 additions & 1 deletion src/components/homeTabs/commons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,6 @@ export const EnhancedRewardCard = styled(RewardCard)`
}
`;

export const ExtLink = styled(GLink)``;
export const ExtLinkCyan = styled(GLink)`
color: ${brandColors.cyan[500]};
`;
Loading

1 comment on commit e006f8e

@vercel
Copy link

@vercel vercel bot commented on e006f8e Apr 28, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

giveth-dapps-v2 – ./

www.giveth.io
giveth.io
giveth-dapps-v2-givethio.vercel.app
giveth-dapps-v2-git-main-givethio.vercel.app

Please sign in to comment.