From f9fbf67022ec3edcec9eeb72d115815e2159dc90 Mon Sep 17 00:00:00 2001 From: Bamdad Sabbagh Date: Tue, 25 Jun 2024 17:17:36 +0200 Subject: [PATCH] fix: props --- src/pages/latest.tsx | 6 +++--- src/pages/top.tsx | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/pages/latest.tsx b/src/pages/latest.tsx index 92200008..a7d355d7 100644 --- a/src/pages/latest.tsx +++ b/src/pages/latest.tsx @@ -24,9 +24,9 @@ export default function LatestPage({latest}: LatestPageProps): ReactElement { ); } -export async function getStaticProps(): Promise< - GetStaticPropsResult -> { +type GetStaticProps = GetStaticPropsResult; + +export async function getStaticProps(): Promise { const latest = await apiQuery('latest'); return { diff --git a/src/pages/top.tsx b/src/pages/top.tsx index b185d114..40a9a467 100644 --- a/src/pages/top.tsx +++ b/src/pages/top.tsx @@ -24,9 +24,9 @@ export default function TopPage({top}: TopPageProps): ReactElement { ); } -export async function getStaticProps(): Promise< - GetStaticPropsResult -> { +type GetStaticProps = GetStaticPropsResult; + +export async function getStaticProps(): Promise { const top = await apiQuery('top'); return {