feat: add type for bots endpoint

This commit is contained in:
원더 2021-01-06 13:24:32 +09:00
parent a572d0b753
commit 145bbe47ea

View File

@ -1,5 +1,7 @@
import { GetServerSideProps, NextPage } from 'next'
import { NextPage, NextPageContext } from 'next'
import { ParsedUrlQuery } from 'querystring'
import Container from '../../components/Container'
import Fetch from '../../utils/Fetch'
const Bots:NextPage = () => {
return <Container>
@ -7,7 +9,17 @@ const Bots:NextPage = () => {
</Container>
}
export const getServerSideProps: GetServerSideProps = async (context) => {
export const getServerSideProps = async (ctx: Context) => {
console.log(ctx.query)
return { props: { data: {} } }
}
export default Bots
interface Context extends NextPageContext {
query: Query
}
interface Query extends ParsedUrlQuery {
id: string
}