Skip to content

Commit

Permalink
refactor: replace Row - wip
Browse files Browse the repository at this point in the history
  • Loading branch information
kristofferlarberg committed Dec 16, 2022
1 parent 8eaf20a commit 5867607
Show file tree
Hide file tree
Showing 19 changed files with 409 additions and 453 deletions.
25 changes: 10 additions & 15 deletions client/src/components/Carousel/Carousel.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import React, { useEffect, useState } from 'react'
import Image from 'next/image'
import { useNextSanityImage } from 'next-sanity-image'
import styled from 'styled-components'
import { Row, Col } from 'react-bootstrap'
import Gravatar from 'react-gravatar'
import Slider from 'react-slick'
import { rgba } from 'polished'
Expand Down Expand Up @@ -308,20 +307,16 @@ export const Carousel = ({ content, coworker = false }) => {
}
return (
<Container>
<Row className="justify-content-center">
<Col lg="12" xl="11">
<SliderStyled {...slickSettings} activeSlide={activeSlide}>
{content.map((person, i) => {
const active = activeSlide === i
return coworker ? (
<Coworker item={person} key={i} active={active} />
) : (
<Client item={person} key={i} active={active} />
)
})}
</SliderStyled>
</Col>
</Row>
<SliderStyled {...slickSettings} activeSlide={activeSlide}>
{content.map((person, i) => {
const active = activeSlide === i
return coworker ? (
<Coworker item={person} key={i} active={active} />
) : (
<Client item={person} key={i} active={active} />
)
})}
</SliderStyled>
</Container>
)
}
10 changes: 3 additions & 7 deletions client/src/components/ContentCard/ContentCard.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import clsx from 'clsx'
import React from 'react'
import { Col } from 'react-bootstrap'
import styled from 'styled-components'
import clsx from 'clsx'

import { Box, Typography } from '../Core'

Expand All @@ -16,10 +15,7 @@ const StyledBox = styled(Box)`
`

export const ContentCard = ({ dark = false, className, title, ...rest }) => (
<Col
lg="4"
md="6"
className="mb-4"
<div
data-aos="fade-zoom-in"
data-aos-easing="ease-in-back"
data-aos-delay="50"
Expand All @@ -38,5 +34,5 @@ export const ContentCard = ({ dark = false, className, title, ...rest }) => (
{title}
</Typography.H3>
</StyledBox>
</Col>
</div>
)
Loading

0 comments on commit 5867607

Please sign in to comment.