File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -11,8 +11,8 @@ import { Steps } from "~/components";
1111import { format } from " date-fns" ;
1212import { 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
1717const 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 (
Original file line number Diff line number Diff line change @@ -3,7 +3,9 @@ import type { APIRoute } from "astro";
33import { getChangelogs , getRSSItems } from "~/util/changelog" ;
44
55export 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,
You can’t perform that action at this time.
0 commit comments