Skip to content

Commit

Permalink
Merge pull request #879 from Giveth/develop
Browse files Browse the repository at this point in the history
Release 2.0.7
  • Loading branch information
MohammadPCh authored Jun 7, 2022
2 parents 021d513 + 8d896f8 commit 3032abf
Show file tree
Hide file tree
Showing 187 changed files with 4,139 additions and 3,184 deletions.
3 changes: 2 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
{
"endOfLine": "auto"
}
]
],
"import/named": "error"
},
"settings": {
"import/resolver": {
Expand Down
9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "givethdapp",
"version": "2.0.6",
"version": "2.0.7",
"private": true,
"scripts": {
"build": "next build",
Expand All @@ -19,6 +19,7 @@
"@ethersproject/units": "^5.5.0",
"@giveth/ui-design-system": "^1.8.3",
"@gnosis.pm/safe-apps-web3-react": "^1.3.0",
"@reduxjs/toolkit": "^1.8.1",
"@sentry/nextjs": "^6.19.3",
"@toruslabs/torus-embed": "^1.20.2",
"@uniswap/v3-sdk": "^3.6.2-optimism-regenesis",
Expand All @@ -29,13 +30,13 @@
"axios": "^0.25.0",
"bignumber.js": "^9.0.1",
"deepmerge": "^4.2.2",
"ethers": "^5.5.3",
"ethers": "^5.6.5",
"framer-motion": "^6.2.8",
"graphql": "^16.0.1",
"human-standard-token-abi": "^2.0.0",
"lodash.debounce": "^4.0.8",
"lodash.isequal": "^4.5.0",
"next": "^12.1.4",
"next": "^12.1.6",
"nprogress": "^0.2.0",
"quill": "^1.3.7",
"quill-emoji": "^0.2.0",
Expand All @@ -51,9 +52,11 @@
"react-lottie": "^1.2.3",
"react-places-autocomplete": "^7.3.0",
"react-quill": "^2.0.0-beta.4",
"react-redux": "^8.0.1",
"react-select": "^5.2.1",
"react-share": "^4.4.0",
"sharp": "^0.30.3",
"siwe": "^1.1.6",
"styled-components": "^5.3.0",
"unsplash-js": "^7.0.15"
},
Expand Down
48 changes: 21 additions & 27 deletions pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@ import { ExternalProvider, Web3Provider } from '@ethersproject/providers';
import NProgress from 'nprogress';

import { useRouter } from 'next/router';
import { NftsProvider } from '@/context/positions.context';
import { TokenDistroProvider } from '@/context/tokenDistro.context';
import { SubgraphProvider } from '@/context/subgraph.context';
import { PriceProvider } from '@/context/price.context';
import { Provider } from 'react-redux';
import { GeneralProvider } from '@/context/general.context';
import { useApollo } from '@/apollo/apolloClient';
import { UserProvider } from '@/context/UserProvider';
import { ModalProvider } from '@/context/ModalProvider';
import { HeaderWrapper } from '@/components/Header/HeaderWrapper';
import { FooterWrapper } from '@/components/Footer/FooterWrapper';

import '../styles/globals.css';
import { store } from '@/features/store';
import SubgraphController from '@/components/controller/subgraph.ctrl';
import UserController from '@/components/controller/user.ctrl';
import ModalController from '@/components/controller/modal.ctrl';
import PriceController from '@/components/controller/price.ctrl';
import type { AppProps } from 'next/app';

function getLibrary(provider: ExternalProvider) {
Expand Down Expand Up @@ -57,27 +57,21 @@ function MyApp({ Component, pageProps }: AppProps) {
content='width=device-width, initial-scale=1.0'
/>
</Head>
<GeneralProvider>
<ApolloProvider client={apolloClient}>
<Web3ReactProvider getLibrary={getLibrary}>
<SubgraphProvider>
<TokenDistroProvider>
<NftsProvider>
<PriceProvider>
<UserProvider>
<ModalProvider>
<HeaderWrapper />
<Component {...pageProps} />
<FooterWrapper />
</ModalProvider>
</UserProvider>
</PriceProvider>
</NftsProvider>
</TokenDistroProvider>
</SubgraphProvider>
</Web3ReactProvider>
</ApolloProvider>
</GeneralProvider>
<Provider store={store}>
<GeneralProvider>
<ApolloProvider client={apolloClient}>
<Web3ReactProvider getLibrary={getLibrary}>
<PriceController />
<SubgraphController />
<UserController />
<HeaderWrapper />
<Component {...pageProps} />
<FooterWrapper />
<ModalController />
</Web3ReactProvider>
</ApolloProvider>
</GeneralProvider>
</Provider>
<Toaster containerStyle={{ top: '80px' }} />
</>
);
Expand Down
4 changes: 3 additions & 1 deletion pages/about.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import Head from 'next/head';
import AboutIndex from '@/components/views/about/AboutIndex';
import { aboutMetatags } from '@/content/metatags';
import { GeneralMetatags } from '@/components/Metatag';

const AboutRoute = () => {
return (
<>
<Head>
<title>About Us | Giveth</title>
<GeneralMetatags info={aboutMetatags} />
</Head>
<AboutIndex />
</>
Expand Down
8 changes: 3 additions & 5 deletions pages/account.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,21 @@ import { H5 } from '@giveth/ui-design-system';
import Head from 'next/head';
import { FC } from 'react';
import UserPublicProfileView from '@/components/views/userPublicProfile/UserPublicProfile.view';
import useUser from '@/context/UserProvider';
import { useAppSelector } from '@/features/hooks';

const NoUserContainer = styled.div`
padding: 200px;
`;

const UserRoute: FC = () => {
const {
state: { user },
} = useUser();
const user = useAppSelector(state => state.user.userData);
return (
<>
<Head>
<title>Giveth | {user?.name}</title>
</Head>
{user ? (
<UserPublicProfileView user={user} myAccount={true} />
<UserPublicProfileView user={user} myAccount />
) : (
<NoUserContainer>
<H5>Not logged in or user not found</H5>
Expand Down
2 changes: 0 additions & 2 deletions pages/claim.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { useEffect } from 'react';
import ClaimView from '@/components/views/claim/Claim.view';
import { ClaimProvider } from '@/context/claim.context';
import { ETheme, useGeneral } from '@/context/general.context';
import { GiveconomyMeta } from '@/lib/meta';

export default function GIVdropRoute() {
const { setShowHeader, setTheme } = useGeneral();
Expand All @@ -22,7 +21,6 @@ export default function GIVdropRoute() {
<>
<Head>
<title>GIVdrop</title>
<GiveconomyMeta />
</Head>
<ClaimProvider>
<ClaimView />
Expand Down
2 changes: 1 addition & 1 deletion pages/donate/[slug].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { captureException } from '@sentry/nextjs';
import { IProjectBySlug } from '@/apollo/types/types';
import { FETCH_PROJECT_BY_SLUG } from '@/apollo/gql/gqlProjects';
import { client } from '@/apollo/apolloClient';
import { ProjectMeta } from '@/lib/meta';
import { ProjectMeta } from '@/components/Metatag';

const DonateIndex = dynamic(
() => import('@/components/views/donate/DonateIndex'),
Expand Down
6 changes: 3 additions & 3 deletions pages/givbacks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ import { useEffect } from 'react';

import GIVbackView from '@/components/views/Back.view';
import { useGeneral, ETheme } from '@/context/general.context';
import { GiveconomyMeta } from '@/lib/meta';
import { givbacksMetatags } from '@/content/metatags';
import { GeneralMetatags } from '@/components/Metatag';

export default function GIVbacksRoute() {
const { setTheme } = useGeneral();
Expand All @@ -17,8 +18,7 @@ export default function GIVbacksRoute() {
return (
<>
<Head>
<title>GIVbacks</title>
<GiveconomyMeta />
<GeneralMetatags info={givbacksMetatags} />
</Head>
<GIVbackView />
</>
Expand Down
6 changes: 3 additions & 3 deletions pages/giveconomy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ import { useEffect } from 'react';

import HomeView from '@/components/views/Home.view';
import { ETheme, useGeneral } from '@/context/general.context';
import { GiveconomyMeta } from '@/lib/meta';
import { giveconomyMetatags } from '@/content/metatags';
import { GeneralMetatags } from '@/components/Metatag';

export default function GIVeconomyRoute() {
const { setTheme } = useGeneral();
Expand All @@ -18,8 +19,7 @@ export default function GIVeconomyRoute() {
return (
<>
<Head>
<title>GIVeconomy</title>
<GiveconomyMeta />
<GeneralMetatags info={giveconomyMetatags} />
</Head>
<HomeView />
</>
Expand Down
6 changes: 3 additions & 3 deletions pages/givfarm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ import { useEffect } from 'react';

import GIVfarmView from '@/components/views/Farm.view';
import { useGeneral, ETheme } from '@/context/general.context';
import { GiveconomyMeta } from '@/lib/meta';
import { givfarmMetatags } from '@/content/metatags';
import { GeneralMetatags } from '@/components/Metatag';

export default function GIVfarmRoute() {
const { setTheme } = useGeneral();
Expand All @@ -17,8 +18,7 @@ export default function GIVfarmRoute() {
return (
<>
<Head>
<title>GIVfarm</title>
<GiveconomyMeta />
<GeneralMetatags info={givfarmMetatags} />
</Head>
<GIVfarmView />
</>
Expand Down
6 changes: 3 additions & 3 deletions pages/givgarden.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ import { useEffect } from 'react';

import GIVgardenView from '@/components/views/Garden.view';
import { useGeneral, ETheme } from '@/context/general.context';
import { GiveconomyMeta } from '@/lib/meta';
import { givgardenMetatags } from '@/content/metatags';
import { GeneralMetatags } from '@/components/Metatag';

export default function GIVgardenRoute() {
const { setTheme } = useGeneral();
Expand All @@ -17,8 +18,7 @@ export default function GIVgardenRoute() {
return (
<>
<Head>
<title>GIVgarden</title>
<GiveconomyMeta />
<GeneralMetatags info={givgardenMetatags} />
</Head>
<GIVgardenView />
</>
Expand Down
6 changes: 3 additions & 3 deletions pages/givstream.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ import { useEffect } from 'react';

import GIVstreamView from '@/components/views/Stream.view';
import { useGeneral, ETheme } from '@/context/general.context';
import { GiveconomyMeta } from '@/lib/meta';
import { givstreamMetatags } from '@/content/metatags';
import { GeneralMetatags } from '@/components/Metatag';

export default function GIVstreamRoute() {
const { setTheme } = useGeneral();
Expand All @@ -17,8 +18,7 @@ export default function GIVstreamRoute() {
return (
<>
<Head>
<title>GIVstream</title>
<GiveconomyMeta />
<GeneralMetatags info={givstreamMetatags} />
</Head>
<GIVstreamView />
</>
Expand Down
13 changes: 5 additions & 8 deletions pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ import { client } from '@/apollo/apolloClient';
import { FETCH_HOME_PROJECTS } from '@/apollo/gql/gqlProjects';
import { EDirection, gqlEnums } from '@/apollo/types/gqlEnums';
import { IProject } from '@/apollo/types/types';
import useUser from '@/context/UserProvider';
import { HomeMeta } from '@/lib/meta';
import { useAppSelector } from '@/features/hooks';
import { homeMetatags } from '@/content/metatags';
import { GeneralMetatags } from '@/components/Metatag';

const projectsToFetch = 12;

Expand Down Expand Up @@ -35,10 +36,7 @@ const fetchProjects = async (userId: string | undefined = undefined) => {
};

const HomeRoute = (props: IHomeRoute) => {
const {
state: { user },
} = useUser();

const user = useAppSelector(state => state.user.userData);
const [projects, setProjects] = useState(props.projects);
const [totalCount, setTotalCount] = useState(props.totalCount);

Expand All @@ -52,8 +50,7 @@ const HomeRoute = (props: IHomeRoute) => {
return (
<>
<Head>
<title>Home | Giveth</title>
<HomeMeta />
<GeneralMetatags info={homeMetatags} />
</Head>
<HomeIndex projects={projects} totalCount={totalCount} />
</>
Expand Down
6 changes: 3 additions & 3 deletions pages/projects.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ import { FETCH_ALL_PROJECTS } from '@/apollo/gql/gqlProjects';
import { OPTIONS_HOME_PROJECTS } from '@/apollo/gql/gqlOptions';
import ProjectsIndex from '@/components/views/projects/ProjectsIndex';
import { ICategory, IProject } from '@/apollo/types/types';
import { ProjectsMeta } from '@/lib/meta';
import { projectsMetatags } from '@/content/metatags';
import { GeneralMetatags } from '@/components/Metatag';

interface IProjectsRoute {
projects: IProject[];
Expand All @@ -17,8 +18,7 @@ const ProjectsRoute = (props: IProjectsRoute) => {
return (
<>
<Head>
<title>Projects | Giveth</title>
<ProjectsMeta />
<GeneralMetatags info={projectsMetatags} />
</Head>
<ProjectsIndex
projects={projects}
Expand Down
Loading

1 comment on commit 3032abf

@vercel
Copy link

@vercel vercel bot commented on 3032abf Jun 7, 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 – ./

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

Please sign in to comment.