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 {