diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000000..ef8a85e7a2 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,12 @@ +{ + "cSpell.words": [ + "giveth", + "merkle", + "xdai", + "GIVpower", + "GIVeconomy", + "GIVfarm", + "GIVback", + "GIVstream", + ] +} \ No newline at end of file diff --git a/next.config.js b/next.config.js index 1ffafed454..efbba2a654 100644 --- a/next.config.js +++ b/next.config.js @@ -20,11 +20,17 @@ const moduleExports = withBundleAnalyzer({ 'static.tgbwidget.com', 'images.unsplash.com', 'd2m0e1zy3fwxmp.cloudfront.net', // temporal for CHANGE default image + 'static.tgb-preprod.com', + 'tgb-preproduction-formio.s3.amazonaws.com', + 'dashboard.tgb-preprod.com', ], }, compiler: { // ssr and displayName are configured by default styledComponents: true, + // removeConsole: { + // exclude: ['error'], + // }, }, redirects: () => { return [ diff --git a/package.json b/package.json index 084c58abb3..741f62fbe8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "givethdapp", - "version": "2.2.8", + "version": "2.3.0", "private": true, "scripts": { "build": "next build", @@ -19,7 +19,7 @@ "@ethersproject/contracts": "^5.5.0", "@ethersproject/providers": "^5.5.0", "@ethersproject/units": "^5.5.0", - "@giveth/ui-design-system": "^1.8.22", + "@giveth/ui-design-system": "^1.8.26", "@gnosis.pm/safe-apps-web3-react": "^1.5.0", "@reduxjs/toolkit": "^1.8.1", "@sentry/nextjs": "^6.19.3", @@ -43,7 +43,8 @@ "quill-emoji": "^0.2.0", "quill-image-drop-and-paste": "^1.2.11", "quill-image-resize-module": "^3.0.0", - "quill-magic-url": "^4.1.7", + "quill-magic-url": "^4.2.0", + "rc-slider": "^10.0.1", "react": "^18.2.0", "react-custom-scrollbars": "^4.2.1", "react-datepicker": "^4.8.0", @@ -54,7 +55,7 @@ "react-hot-toast": "^2.1.1", "react-lottie": "^1.2.3", "react-places-autocomplete": "^7.3.0", - "react-quill": "^2.0.0-beta.4", + "react-quill": "^2.0.0", "react-redux": "^8.0.1", "react-select": "^5.2.1", "react-share": "^4.4.0", @@ -67,7 +68,7 @@ "@next/bundle-analyzer": "^12.1.4", "@types/apollo-upload-client": "^14.1.0", "@types/lodash.isequal": "^4.5.5", - "@types/node": "16.11.6", + "@types/node": "17.0.29", "@types/nprogress": "^0.2.0", "@types/react": "^18.0.15", "@types/react-custom-scrollbars": "^4.0.9", diff --git a/pages/account.tsx b/pages/account.tsx index 1592d88e5a..94f321f3b5 100644 --- a/pages/account.tsx +++ b/pages/account.tsx @@ -2,7 +2,7 @@ import styled from 'styled-components'; 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 UserProfileView from '@/components/views/userProfile/UserProfile.view'; import { useAppSelector } from '@/features/hooks'; const NoUserContainer = styled.div` @@ -17,7 +17,7 @@ const UserRoute: FC = () => { Giveth | {user?.name} {user ? ( - + ) : (
Not logged in or user not found
diff --git a/pages/givpower.tsx b/pages/givpower.tsx new file mode 100644 index 0000000000..cf2453fdfb --- /dev/null +++ b/pages/givpower.tsx @@ -0,0 +1,23 @@ +import { useEffect } from 'react'; +import GIVpowerView from '@/components/views/Power.view'; +import { GeneralMetatags } from '@/components/Metatag'; +import { setDarkTheme, setLightTheme } from '@/features/general/general.slice'; +import { useAppDispatch } from '@/features/hooks'; +import { givpowerMetatags } from '@/content/metatags'; + +export default function GIVpowerRoute() { + const dispatch = useAppDispatch(); + + useEffect(() => { + dispatch(setDarkTheme()); + return () => { + dispatch(setLightTheme()); + }; + }, [dispatch]); + return ( + <> + + + + ); +} diff --git a/pages/index.tsx b/pages/index.tsx index 16c123efc7..75204153bd 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -9,6 +9,7 @@ import { useAppSelector } from '@/features/hooks'; import { homeMetatags } from '@/content/metatags'; import { GeneralMetatags } from '@/components/Metatag'; import { transformGraphQLErrorsToStatusCode } from '@/helpers/requests'; +import { IS_BOOSTING_ENABLED } from '@/configuration'; const projectsToFetch = 12; @@ -20,7 +21,12 @@ interface IHomeRoute { const fetchProjects = async (userId: string | undefined = undefined) => { const variables: any = { limit: projectsToFetch, - orderBy: { field: gqlEnums.QUALITYSCORE, direction: EDirection.DESC }, + orderBy: { + field: IS_BOOSTING_ENABLED + ? gqlEnums.GIVPOWER + : gqlEnums.QUALITYSCORE, + direction: EDirection.DESC, + }, }; if (userId) { @@ -60,7 +66,6 @@ export async function getServerSideProps({ res }: any) { 'Cache-Control', 'public, s-maxage=10, stale-while-revalidate=59', ); - try { const { projects, totalCount } = await fetchProjects(); return { diff --git a/pages/test.tsx b/pages/test.tsx index a1f4b0ebeb..aaeb6e8979 100644 --- a/pages/test.tsx +++ b/pages/test.tsx @@ -1,4 +1,3 @@ -import Head from 'next/head'; import styled from 'styled-components'; import { GetServerSideProps } from 'next'; import { useWeb3React } from '@web3-react/core'; @@ -42,9 +41,6 @@ const TestRoute = () => { return ( <> - - -