Skip to content

Commit eb29761

Browse files
committed
fix types in the get-eth page
1 parent 50cad68 commit eb29761

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

src/pages/get-eth.tsx

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { GetStaticProps } from "next/types"
1+
import type { GetStaticProps, InferGetStaticPropsType } from "next/types"
22
import { type SSRConfig, useTranslation } from "next-i18next"
33
import { serverSideTranslations } from "next-i18next/serverSideTranslations"
44
import type { ComponentPropsWithRef } from "react"
@@ -99,6 +99,11 @@ const RightColumn = (props: ChildOnlyProp) => (
9999
/>
100100
)
101101

102+
type Props = SSRConfig & {
103+
lastDeployDate: string
104+
lastDataUpdateDate: string
105+
}
106+
102107
export const getStaticProps = (async (context) => {
103108
const { locale } = context
104109
// load i18n required namespaces for the given page
@@ -115,9 +120,11 @@ export const getStaticProps = (async (context) => {
115120
lastDataUpdateDate,
116121
},
117122
}
118-
}) satisfies GetStaticProps<SSRConfig>
123+
}) satisfies GetStaticProps<Props>
119124

120-
const GetEthPage = ({ lastDataUpdateDate }) => {
125+
const GetEthPage = ({
126+
lastDataUpdateDate,
127+
}: InferGetStaticPropsType<typeof getStaticProps>) => {
121128
const { t } = useTranslation("page-get-eth")
122129

123130
const tokenSwaps: CardListItem[] = [

0 commit comments

Comments
 (0)