Skip to content

Commit

Permalink
Fix landing page margins
Browse files Browse the repository at this point in the history
  • Loading branch information
kattylucy committed Oct 23, 2024
1 parent 3d38426 commit 14a0bb1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 31 deletions.
2 changes: 0 additions & 2 deletions centrifuge-app/src/components/LayoutBase/styles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,6 @@ export const WalletInner = styled(Stack)`
@media (min-width: ${({ theme }) => theme.breakpoints[BREAK_POINT_COLUMNS]}) {
justify-content: flex-end;
height: 50px;
margin-right: 30px;
margin-top: 15px;
}
`
Expand Down Expand Up @@ -200,7 +199,6 @@ export const ContentWrapper = styled.div`
@media (min-width: ${({ theme }) => theme.breakpoints['M']}) and (max-width: ${({ theme }) =>
theme.breakpoints['L']}) {
margin-left: 7vw;
width: calc(100% - 7vw);
margin-top: 10px;
}
Expand Down
11 changes: 0 additions & 11 deletions centrifuge-app/src/components/PoolCard/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,7 @@ const StyledRouterTextLink = styled(RouterTextLink)`
text-decoration: none;
`
const StyledCard = styled(Card)`
width: 100%;
max-width: 100%;
height: 320px;
margin-right: 12px;
margin-bottom: 12px;
padding: 12px;
border: 1px solid rgba(207, 207, 207, 0.5);
Expand All @@ -46,14 +43,6 @@ const StyledCard = styled(Card)`
border: 1px solid ${({ theme }) => theme.colors.textPrimary};
box-shadow: 0px 20px 24px -4px rgba(16, 24, 40, 0.08), 0px 8px 8px -4px rgba(16, 24, 40, 0.03);
}
@media (min-width: ${({ theme }) => theme.breakpoints['M']}) {
width: auto;
}
@media (min-width: ${({ theme }) => theme.breakpoints['XL']}) {
width: auto;
}
`

const StyledText = styled(Text)`
Expand Down
25 changes: 7 additions & 18 deletions centrifuge-app/src/components/PoolList.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Centrifuge, { Pool, PoolMetadata } from '@centrifuge/centrifuge-js'
import { useCentrifuge } from '@centrifuge/centrifuge-react'
import { Box, IconChevronRight, Shelf, Stack, Text } from '@centrifuge/fabric'
import { Box, Grid, IconChevronRight, Shelf, Stack, Text } from '@centrifuge/fabric'
import * as React from 'react'
import { useLocation } from 'react-router'
import styled from 'styled-components'
Expand Down Expand Up @@ -82,7 +82,7 @@ export function PoolList() {
<Stack>
<Stack>
<Box overflow="auto">
<Box as="ul" role="list" display="flex" flexWrap="wrap">
<Grid as="ul" columns={[1, 2, 3]} gap={2}>
{metadataIsLoading
? Array(6)
.fill(true)
Expand All @@ -92,16 +92,11 @@ export function PoolList() {
</Box>
))
: filteredPools.map((pool) => (
<PoolCardBox
as="li"
key={pool.poolId}
status={pool.status}
width={isLarge ? '33%' : isMedium ? '48%' : '100%'}
>
<PoolCardBox as="li" key={pool.poolId} status={pool.status}>
<PoolCard {...pool} />
</PoolCardBox>
))}
</Box>
</Grid>
</Box>
</Stack>
{!metadataIsLoading && archivedPools.length > 0 && (
Expand All @@ -127,21 +122,15 @@ export function PoolList() {
function ArchivedPools({ pools }: { pools: PoolCardProps[] }) {
const isMedium = useIsAboveBreakpoint('M')
const isLarge = useIsAboveBreakpoint('L')
const isExtraLarge = useIsAboveBreakpoint('XL')
return (
<Stack gap={1} overflow="auto">
<Box as="ul" role="list" display="flex" flexWrap="wrap">
<Grid as="ul" columns={[1, 2, 3]} gap={2}>
{pools.map((pool) => (
<PoolCardBox
as="li"
key={pool.poolId}
status={pool.status}
width={isLarge ? '33%' : isMedium ? '48%' : '100%'}
>
<PoolCardBox as="li" key={pool.poolId} status={pool.status}>
<PoolCard {...pool} />
</PoolCardBox>
))}
</Box>
</Grid>
</Stack>
)
}
Expand Down

0 comments on commit 14a0bb1

Please sign in to comment.