-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into ft/codefroafrica-team-infographic
Signed-off-by: Kipruto <[email protected]>
- Loading branch information
Showing
28 changed files
with
354 additions
and
66 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 1 addition & 27 deletions
28
apps/codeforafrica/src/components/ConnectBar/ConnectBar.snap.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,3 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`<ConnectBar /> renders unchanged 1`] = ` | ||
<div> | ||
<div | ||
class="MuiStack-root css-150zc89-MuiStack-root" | ||
> | ||
<div | ||
class="MuiStack-root css-1mbd5au-MuiStack-root" | ||
> | ||
<a | ||
aria-label="facebook" | ||
class="MuiTypography-root MuiTypography-inherit MuiLink-root MuiLink-underlineAlways MuiBox-root active css-tmo8yp-MuiTypography-root-MuiLink-root" | ||
data-mui-internal-clone-element="true" | ||
href="https://www.facebook.com/" | ||
rel="noreferrer noopener" | ||
target="_blank" | ||
> | ||
<div | ||
aria-hidden="true" | ||
class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium css-1dz6c5u-MuiSvgIcon-root" | ||
focusable="false" | ||
viewbox="0 0 24 24" | ||
/> | ||
</a> | ||
</div> | ||
</div> | ||
</div> | ||
`; | ||
exports[`<ConnectBar /> renders unchanged 1`] = `<div />`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
import { Section } from "@commons-ui/core"; | ||
import { Box } from "@mui/material"; | ||
import React from "react"; | ||
|
||
import AboutChildPageHeader from "@/codeforafrica/components/AboutChildPageHeader"; | ||
import ConnectBar from "@/codeforafrica/components/ConnectBar"; | ||
import RelatedProjects from "@/codeforafrica/components/RelatedProjects"; | ||
import RichText from "@/codeforafrica/components/RichText"; | ||
import SectionDivider from "@/codeforafrica/components/SectionDivider"; | ||
|
||
const Partner = React.forwardRef(function Partner( | ||
{ description, connect, relatedProjects, relatedProjectsTitle, name, logo }, | ||
ref, | ||
) { | ||
return ( | ||
<Box ref={ref} sx={{ pb: { xs: 10, md: 7 } }}> | ||
<AboutChildPageHeader | ||
name={name} | ||
image={logo} | ||
FigureProps={{ | ||
sx: { | ||
backgroundPositionY: "center", | ||
backgroundRepeat: "no-repeat", | ||
backgroundSize: "contain", | ||
bgcolor: "background.default", | ||
borderRadius: 0, | ||
filter: "drop-shadow(0px 8.7px 17.4px rgba(0, 0, 0, 0.1))", | ||
height: { xs: 116 }, | ||
width: { xs: 247 }, | ||
}, | ||
}} | ||
/> | ||
<Section | ||
sx={{ | ||
px: { xs: 2.5, sm: 0 }, | ||
pt: { xs: 2.5, md: 7 }, | ||
maxWidth: { | ||
sm: "648px", | ||
md: "912px", | ||
}, | ||
}} | ||
> | ||
<RichText | ||
variant="subheading" | ||
component="p" | ||
sx={{ | ||
mb: 5, | ||
typography: "subheading", | ||
"& > p": { | ||
mb: 5, | ||
}, | ||
}} | ||
elements={description} | ||
/> | ||
|
||
<ConnectBar title="Connect" links={connect} /> | ||
</Section> | ||
{relatedProjects?.length ? ( | ||
<> | ||
<SectionDivider | ||
sx={{ | ||
maxWidth: { | ||
sm: "648px", | ||
md: "912px", | ||
}, | ||
px: { xs: 2.5, sm: 0 }, | ||
py: { xs: "30px", md: 5 }, | ||
}} | ||
/> | ||
<RelatedProjects | ||
sx={{ | ||
maxWidth: { | ||
sm: "648px", | ||
md: "912px", | ||
}, | ||
pt: 0, | ||
}} | ||
tileListProps={{ fixed: true }} | ||
titleProps={{ sx: { mb: { xs: "30px", md: 5 } } }} | ||
title={relatedProjectsTitle} | ||
projects={relatedProjects} | ||
/> | ||
</> | ||
) : null} | ||
</Box> | ||
); | ||
}); | ||
|
||
export default Partner; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`<Partners /> renders unchanged 1`] = ` | ||
<div> | ||
<div | ||
class="MuiBox-root css-1gghq2r" | ||
> | ||
<div | ||
class="MuiContainer-root MuiContainer-maxWidthLg MuiContainer-fixed MuiContainer-disableGutters css-1ilq66o-MuiContainer-root" | ||
> | ||
<div | ||
class="MuiBox-root css-15sqwg8" | ||
> | ||
Lorem ipsum dolor sit amet consectetur adipiscing, elit ac primis praesent | ||
tempor luctus libero, curae condimentum ultricies proin leo. Arcu ornare dis fermentum nisi consequat imperdiet porta viverra placerat nullam, dapibus molestie faucibus id mi lacinia orci magnis. Ridiculus aptent phasellus mus nisi porta rutrum tellus, ut venenatis feugiat massa volutpat. | ||
Duis maecenas per erat odio quisque accumsan, donec tempus class euismod vulputate fermentum imperdiet, suspendisse blandit lacinia semper cursus. Neque tristique posuere a feugiat convallis tempor cras nunc, leo faucibus cum aptent placerat aenean lobortis, nibh iaculis ac nascetur praesent mus quisque. Nullam leo rutrum augue urna cubilia morbi enim, arcu risus mus mauris elementum pulvinar, laoreet bibendum convallis senectus ullamcorper malesuada. | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { createRender } from "@commons-ui/testing-library"; | ||
import React from "react"; | ||
|
||
import Partner from "./Partner"; | ||
|
||
import theme from "@/codeforafrica/theme"; | ||
|
||
// eslint-disable-next-line testing-library/render-result-naming-convention | ||
const render = createRender({ theme }); | ||
|
||
const defaultProps = { | ||
description: [ | ||
{ | ||
text: "Lorem ipsum dolor sit amet consectetur adipiscing, elit ac primis praesent", | ||
}, | ||
{ | ||
text: "tempor luctus libero, curae condimentum ultricies proin leo. Arcu ornare dis fermentum nisi consequat imperdiet porta viverra placerat nullam, dapibus molestie faucibus id mi lacinia orci magnis. Ridiculus aptent phasellus mus nisi porta rutrum tellus, ut venenatis feugiat massa volutpat. ", | ||
}, | ||
{ | ||
text: "Duis maecenas per erat odio quisque accumsan, donec tempus class euismod vulputate fermentum imperdiet, suspendisse blandit lacinia semper cursus. Neque tristique posuere a feugiat convallis tempor cras nunc, leo faucibus cum aptent placerat aenean lobortis, nibh iaculis ac nascetur praesent mus quisque. Nullam leo rutrum augue urna cubilia morbi enim, arcu risus mus mauris elementum pulvinar, laoreet bibendum convallis senectus ullamcorper malesuada.", | ||
}, | ||
], | ||
}; | ||
|
||
describe("<Partners />", () => { | ||
it("renders unchanged", () => { | ||
const { container } = render(<Partner {...defaultProps} />); | ||
expect(container).toMatchSnapshot(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import Partner from "./Partner"; | ||
|
||
export default Partner; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import formatImpacts from "@/codeforafrica/lib/data/utils/impacts"; | ||
|
||
function getInvolved(block) { | ||
const { impacts, ...other } = block; | ||
const ourImpacts = formatImpacts(impacts); | ||
|
||
return { | ||
...other, | ||
impacts: ourImpacts, | ||
slug: "get-involved", | ||
}; | ||
} | ||
|
||
export default getInvolved; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.