on master help sign in
pages/application: filter canceled, sort by recent
commit2e58af918cc29748ea92a7f3c33b2a067aa024b5 authorMatilde Park <matilde.park@urbit.org> dateFri 18 Nov 2022, 06:51 (4 years ago) parentc0661fd
1 file changed+3−1
pages/applications/[[...application]].js+3−1
pages/applications/[[...application]].js+3−1
@@ -181,7 +181,9 @@ export const getServerSideProps = async ({ params, res }) => {
181181 ? JSON.stringify(Markdown.parse({ post: { content } }))
182182 : null;
183183
184− const matchedGrants = getGrantsByShortcode(params.application) || null;
184+ const matchedGrants = getGrantsByShortcode(params.application)
185+ .filter((e) => !e.extra.canceled)
186+ .sort((a, b) => new Date(b.date) - new Date(a.date))
185187
186188 if (!data.title) {
187189 data = {