-
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 pull request #611 from CodeForAfrica/feature/single-member-page…
…-view Add members single Page View
- Loading branch information
Showing
9 changed files
with
80 additions
and
23 deletions.
There are no files selected for viewing
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
2 changes: 1 addition & 1 deletion
2
...ca/src/components/Partner/Partner.snap.js → ...s/AboutPageEntity/AboutPageEntity.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
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,3 @@ | ||
import AboutPageEntity from "./AboutPageEntity"; | ||
|
||
export default AboutPageEntity; |
This file was deleted.
Oops, something went wrong.
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,37 @@ | ||
import { imageFromMedia } from "@/codeforafrica/lib/data/utils"; | ||
|
||
async function members(api, context) { | ||
const { params, locale } = context; | ||
const slug = params.slugs[2]; | ||
const { docs } = await api.getCollection("members", { | ||
locale, | ||
where: { | ||
slug: { | ||
equals: slug, | ||
}, | ||
}, | ||
}); | ||
if (!docs?.length) { | ||
return null; | ||
} | ||
const [member] = docs; | ||
const meta = { | ||
title: member.name, | ||
description: member.decription, | ||
image: member.image, | ||
}; | ||
return { | ||
blocks: [ | ||
{ | ||
relatedProjects: [], | ||
...member, | ||
user: true, | ||
logo: imageFromMedia(member.image), | ||
blockType: "about-page-entity", | ||
}, | ||
], | ||
meta, | ||
}; | ||
} | ||
|
||
export default members; |
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