Skip to content

Commit

Permalink
Merge pull request #2962 from Giveth/return-instant-boosting
Browse files Browse the repository at this point in the history
Return instant boosting
  • Loading branch information
MohammadPCh authored Jul 20, 2023
2 parents 2f7ef67 + f08d7d1 commit efa4796
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 11 deletions.
2 changes: 1 addition & 1 deletion pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export const HOME_QUERY_VARIABLES = {
skipLatestUpdates: 0,
fromDate: '2021-01-01',
limit: 12,
sortingBy: EProjectsSortBy.GIVPOWER,
sortingBy: EProjectsSortBy.INSTANT_BOOSTING,
};

const HomeRoute = (props: IHomeRoute) => {
Expand Down
2 changes: 1 addition & 1 deletion pages/qf/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export const QF_PROJECTS = {
variables: {
limit: 15,
skip: 0,
sortingBy: EProjectsSortBy.GIVPOWER,
sortingBy: EProjectsSortBy.INSTANT_BOOSTING,
filters: [EProjectsFilter.ACTIVE_QF_ROUND],
},
notifyOnNetworkStatusChange: true,
Expand Down
2 changes: 1 addition & 1 deletion src/apollo/gql/gqlOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export const OPTIONS_HOME_PROJECTS = {
variables: {
limit: 15,
skip: 0,
sortingBy: EProjectsSortBy.GIVPOWER,
sortingBy: EProjectsSortBy.INSTANT_BOOSTING,
},
notifyOnNetworkStatusChange: true,
};
11 changes: 6 additions & 5 deletions src/components/views/projects/ProjectsSortSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
P,
IconFast16,
IconFlash16,
IconRocketInSpace16,
} from '@giveth/ui-design-system';
import Select, {
components,
Expand Down Expand Up @@ -43,11 +44,11 @@ const ProjectsSortSelect = () => {
const { formatMessage } = useIntl();

const sortByOptions = [
// {
// label: formatMessage({ id: 'label.givpower' }),
// value: EProjectsSortBy.INSTANT_BOOSTING,
// icon: <IconRocketInSpace16 color={brandColors.deep[900]} />,
// },
{
label: formatMessage({ id: 'label.givpower' }),
value: EProjectsSortBy.INSTANT_BOOSTING,
icon: <IconRocketInSpace16 color={brandColors.deep[900]} />,
},
{
label: formatMessage({ id: 'label.rank' }),
value: EProjectsSortBy.GIVPOWER,
Expand Down
6 changes: 3 additions & 3 deletions src/context/projects.context.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ interface IProjectsContext {
}

const variablesDefaultValue = {
sortingBy: EProjectsSortBy.GIVPOWER,
sortingBy: EProjectsSortBy.INSTANT_BOOSTING,
filters: undefined,
};

const variablesDefaultValueWithQF = {
sortingBy: EProjectsSortBy.GIVPOWER,
sortingBy: EProjectsSortBy.INSTANT_BOOSTING,
filters: [EProjectsFilter.ACTIVE_QF_ROUND],
};

Expand Down Expand Up @@ -65,7 +65,7 @@ export const ProjectsProvider = (props: {
const router = useRouter();

useEffect(() => {
let sort = EProjectsSortBy.GIVPOWER;
let sort = EProjectsSortBy.INSTANT_BOOSTING;
if (router.query.sort) {
switch ((router.query.sort as string).toLowerCase()) {
case EProjectsSortBy.MOST_FUNDED.toLowerCase():
Expand Down

0 comments on commit efa4796

Please sign in to comment.