Skip to content

Commit

Permalink
chore: sentence case category
Browse files Browse the repository at this point in the history
  • Loading branch information
seaerchin committed Dec 17, 2024
1 parent 6ddd290 commit e971654
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const COLLECTION_ITEMS: IsomerSitemap[] = flatten(
"We’ve looked at how people’s spending correlates with how much microscopic plastic they consumed over the months. We’ve looked at how people’s spending correlates with how much microscopic plastic they consumed over the months.",
date: "07/05/2024",
category: "Category Name",
tags: [{ category: "Jokes", values: ["Dad"], selected: ["Dad"] }],
tags: [{ category: "jokes", values: ["Dad"], selected: ["Dad"] }],
},
{
id: `${index}`,
Expand All @@ -42,7 +42,7 @@ const COLLECTION_ITEMS: IsomerSitemap[] = flatten(
type: "png",
size: "1.2MB",
},
tags: [{ category: "Jokes", values: ["Lame"], selected: ["Lame"] }],
tags: [{ category: "jokes", values: ["Lame"], selected: ["Lame"] }],
},
{
id: `${index}`,
Expand All @@ -57,7 +57,7 @@ const COLLECTION_ITEMS: IsomerSitemap[] = flatten(
ref: "https://guide.isomer.gov.sg",
tags: [
{
category: "Jokes",
category: "jokes",
values: [
"This is a very long tag that should be reflowed on smaller screens maybe",
],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type { Exact } from "type-fest"
import capitalize from "lodash/capitalize"

import type { CollectionPageSchemaType, IsomerSiteProps } from "~/engine"
import type { AllCardProps, ProcessedCollectionCardProps } from "~/interfaces"
Expand Down Expand Up @@ -66,7 +67,10 @@ const getCollectionItems = (
description: item.summary,
image: item.image,
site,
tags: item.tags,
tags: item.tags?.map(({ selected, category }) => ({
selected,
category: capitalize(category),
})),
}

if (item.layout === "file") {
Expand Down

0 comments on commit e971654

Please sign in to comment.