on master help sign in
pages: amend ecosystem pages to match new metadata
commit090d3fa98fbc5ac09a4f159f5384cbd8c97c3bc8 authorMatilde Park <matilde.park@urbit.org> dateTue 19 Jul 2022, 15:52 (4 years ago) parent0c027f8
3 files changed+21−6
pages/marketplaces/[slug].js+7−2 pages/organizations/[slug].js+7−2 pages/podcasts/[slug].js+7−2
pages/marketplaces/[slug].js+7−2
@@ -41,9 +41,14 @@ export async function getStaticProps({ params }) {
4141 );
4242
4343 const spotlights = getAllPosts(
44− ["title", "slug", "featured"],
44+ ["title", "slug", "featured-1", "featured-2", "featured-3"],
4545 "ecosystem/spotlight"
46− ).filter((e) => e.featured.includes(post.title));
46+ ).filter(
47+ (e) =>
48+ e?.["featured-1"]?.title === post.title ||
49+ e?.["featured-2"]?.title === post.title ||
50+ e?.["featured-3"]?.title === post.title
51+ );
4752
4853 let { index } = post?.extra || { index: null };
4954
pages/organizations/[slug].js+7−2
@@ -71,9 +71,14 @@ export async function getStaticProps({ params }) {
7171 );
7272
7373 const spotlights = getAllPosts(
74− ["title", "slug", "featured"],
74+ ["title", "slug", "featured-1", "featured-2", "featured-3"],
7575 "ecosystem/spotlight"
76− ).filter((e) => e.featured.includes(post.title));
76+ ).filter(
77+ (e) =>
78+ e?.["featured-1"]?.title === post.title ||
79+ e?.["featured-2"]?.title === post.title ||
80+ e?.["featured-3"]?.title === post.title
81+ );
7782
7883 const applications = post.ships
7984 .map((ship) => {
pages/podcasts/[slug].js+7−2
@@ -41,9 +41,14 @@ export async function getStaticProps({ params }) {
4141 );
4242
4343 const spotlights = getAllPosts(
44− ["title", "slug", "featured"],
44+ ["title", "slug", "featured-1", "featured-2", "featured-3"],
4545 "ecosystem/spotlight"
46− ).filter((e) => e.featured.includes(post.title));
46+ ).filter(
47+ (e) =>
48+ e?.["featured-1"]?.title === post.title ||
49+ e?.["featured-2"]?.title === post.title ||
50+ e?.["featured-3"]?.title === post.title
51+ );
4752
4853 let { index } = post?.extra || { index: null };
4954