Skip to content

Commit

Permalink
Update src/components/Wallet/FeatureCards/index.tsx
Browse files Browse the repository at this point in the history
Co-authored-by: Aaron Cook <[email protected]>
  • Loading branch information
DiogoSoaress and iamacook authored Oct 31, 2024
1 parent 725c3f5 commit 0523514
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/components/Wallet/FeatureCards/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ type FeatureCardsProps = Omit<BaseBlock, 'items'> & {

const FeatureCards = ({ title, text, items = [] }: FeatureCardsProps) => {
// extract the last item from the array
const [lastItem, ...restItems] = [...items].reverse()
const lastItem = items[items.length - 1]
const restItems = items.slice(0, -1)

return (
<Container className={layoutCss.containerMedium}>
Expand All @@ -46,7 +47,7 @@ const FeatureCards = ({ title, text, items = [] }: FeatureCardsProps) => {
</Grid>

<Grid container mt={{ xs: '50px', md: '100px' }} columnSpacing="30px" rowGap="30px">
{restItems.reverse().map((item, index) => {
{restItems.map((item, index) => {
if (item.fullWidth) {
return (
<Grid container item key={index} xs={12} width="100%">
Expand Down

0 comments on commit 0523514

Please sign in to comment.