Skip to content

Commit

Permalink
Add process featured videos to opportunities page
Browse files Browse the repository at this point in the history
  • Loading branch information
koechkevin committed Jun 18, 2024
1 parent 9c324f7 commit ebcf7d3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const FeaturedVideos = forwardRef(function FeaturedVideos(props, ref) {
{title}
</RichTypography>
<Grid container spacing={3}>
{items.map((item) => (
{items?.map((item) => (
<Grid xs={12} sm={6} md={4} item key={item.id}>
<FeaturedVideoCard {...item} airedOnText={airedOnText} />
</Grid>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { deepmerge } from "@mui/utils";

import processFeaturedVideos from "./processBlockFeaturedVideos";

import formatDateTime from "@/charterafrica/utils/formatDate";

function processOpportunity(opportunity, pageUrl, api, context) {
Expand Down Expand Up @@ -171,7 +173,8 @@ const fetchOpportunitiesCollectionFunctionMap = {
grants: fetchGrants,
};

async function processPageOpportunities(page, api, context) {
async function processPageOpportunities(unProcessedPage, api, context) {
const page = await processFeaturedVideos(unProcessedPage, context.locale);
const { blocks, breadcrumbs = [] } = page;
const pageUrl = breadcrumbs[breadcrumbs.length - 1].url;
const opportunitiesBlocks = await Promise.all(
Expand Down

0 comments on commit ebcf7d3

Please sign in to comment.