Skip to content

Commit 222538c

Browse files
committed
Update logic
1 parent 6e09cad commit 222538c

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

src/pages/changelog/index.astro

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ import { Steps } from "~/components";
1111
import { format } from "date-fns";
1212
import { getChangelogs } from "~/util/changelog";
1313
14-
const initialEntries = await getChangelogs({});
15-
const filteredEntries = initialEntries.filter(x => !(x.data.hidden === true))
14+
const notes = await getChangelogs({
15+
filter: (entry) => entry.data.hidden !== true });
1616
1717
const props = {
1818
frontmatter: {
@@ -26,9 +26,9 @@ const props = {
2626
---
2727

2828
<StarlightPage {...props}>
29-
<Header notes={filteredEntries} />
29+
<Header notes={notes} />
3030
{
31-
filteredEntries.map(async (entry, idx) => {
31+
notes.map(async (entry, idx) => {
3232
const date = format(entry.data.date, "MMM dd, yyyy");
3333

3434
const productIds = JSON.stringify(

src/pages/changelog/rss/index.xml.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ import type { APIRoute } from "astro";
33
import { getChangelogs, getRSSItems } from "~/util/changelog";
44

55
export const GET: APIRoute = async ({ locals }) => {
6-
const notes = await getChangelogs({});
6+
const notes = await getChangelogs({
7+
filter: (entry) => entry.data.hidden !== true });
8+
79

810
const items = await getRSSItems({
911
notes,

0 commit comments

Comments
 (0)