Skip to content

Commit

Permalink
Reviewed changes
Browse files Browse the repository at this point in the history
  • Loading branch information
kelvinkipruto committed Oct 9, 2023
1 parent 4d57d24 commit 1674c6c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
6 changes: 3 additions & 3 deletions apps/codeforafrica/src/lib/data/utils/posts.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,9 @@ export async function getPost(api, slug, primaryTag) {
},
];

const globalPostSettings = await api.findGlobal("settings-publication");
const primaryTagGlobalSettings = globalPostSettings?.[primaryTag] ?? {};
const { showRecent, title: recentTitle } = primaryTagGlobalSettings;
const publicationSettings = await api.findGlobal("settings-publication");
const primaryTagPostSettings = publicationSettings?.[primaryTag] ?? {};
const { showRecent, title: recentTitle } = primaryTagPostSettings;
if (showRecent) {
const { posts } = await getPosts(
api,
Expand Down
4 changes: 1 addition & 3 deletions apps/codeforafrica/src/payload/collections/Posts.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,7 @@ const Posts = {
},
}),
content({ minRows: 1, required: true, localized: true }),
slug({
index: true,
}),
slug(),
publishedOn({ localized: true }),
tags({
admin: {
Expand Down

0 comments on commit 1674c6c

Please sign in to comment.