Skip to content

Commit

Permalink
feat: APP-461 remove filters for Terrasos and change pagination to 9 (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
flagrede authored Nov 14, 2024
1 parent db1d003 commit acdb18b
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 40 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import { msg } from '@lingui/macro';

import { IS_REGEN } from 'lib/env';

export const IMAGE_STORAGE_BASE_URL = import.meta.env
.VITE_IMAGE_STORAGE_BASE_URL;
export const API_URI = import.meta.env.VITE_API_URI;
export const VIEW_ECOCREDITS = 'view your ecocredits';
export const PROJECTS_PER_PAGE = 6;
export const PROJECTS_PER_PAGE = IS_REGEN ? 6 : 9;

export const sortOptions = [
{ label: msg`Featured projects`, value: 'featured-projects' },
Expand Down
78 changes: 39 additions & 39 deletions web-marketplace/src/pages/Projects/AllProjects/AllProjects.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -175,17 +175,17 @@ export const AllProjects: React.FC<React.PropsWithChildren<unknown>> = () => {

return (
<>
<Flex flex={1} sx={{ gridColumn: '1 / -1' }} className="xl:mt-[-78px]">
<Flex
justifyContent="flex-end"
alignItems="center"
flex={1}
sx={{
pb: 5,
flexWrap: { xs: 'wrap', lg: 'nowrap' },
}}
>
{IS_REGEN && (
{IS_REGEN && (
<Flex flex={1} sx={{ gridColumn: '1 / -1' }} className="xl:mt-[-78px]">
<Flex
justifyContent="flex-end"
alignItems="center"
flex={1}
sx={{
pb: 5,
flexWrap: { xs: 'wrap', lg: 'nowrap' },
}}
>
<SideFilter
creditClassFilters={creditClassFilters}
hasCommunityProjects={hasCommunityProjects}
Expand All @@ -197,39 +197,39 @@ export const AllProjects: React.FC<React.PropsWithChildren<unknown>> = () => {
width: { xs: '100%', lg: 'auto' },
}}
/>
)}
<Flex
sx={{
order: { xs: 1, lg: 2 },
alignItems: 'center',
width: { xs: '100%', lg: 'auto' },
}}
>
<Body
size="xs"
<Flex
sx={{
width: [0, 0, 0, 43],
display: { xs: 'none', md: 'block' },
whiteSpace: 'nowrap',
mr: 2,
color: 'info.dark',
fontWeight: 700,
order: { xs: 1, lg: 2 },
alignItems: 'center',
width: { xs: '100%', lg: 'auto' },
}}
>
<Trans>Sort by:</Trans>
</Body>
<SelectTextFieldBase
emptyOptionText={_(EMPTY_OPTION_TEXT)}
className="w-[100%]"
defaultValue={sort}
options={sortOptionsTranslated}
defaultStyle={false}
onChange={handleSort}
sx={{ width: 'fit-content' }}
/>
<Body
size="xs"
sx={{
width: [0, 0, 0, 43],
display: { xs: 'none', md: 'block' },
whiteSpace: 'nowrap',
mr: 2,
color: 'info.dark',
fontWeight: 700,
}}
>
<Trans>Sort by:</Trans>
</Body>
<SelectTextFieldBase
emptyOptionText={_(EMPTY_OPTION_TEXT)}
className="w-[100%]"
defaultValue={sort}
options={sortOptionsTranslated}
defaultStyle={false}
onChange={handleSort}
sx={{ width: 'fit-content' }}
/>
</Flex>
</Flex>
</Flex>
</Flex>
)}
{IS_TERRASOS && (
<TebuBannerWrapper className="-mt-15 mb-3 sm:mt-20 sm:mb-30 col-span-full" />
)}
Expand Down

0 comments on commit acdb18b

Please sign in to comment.