mirror of
https://github.com/koreanbots/core.git
synced 2025-12-16 14:30:22 +00:00
feat: add type for bots endpoint
This commit is contained in:
parent
a572d0b753
commit
145bbe47ea
@ -1,5 +1,7 @@
|
|||||||
import { GetServerSideProps, NextPage } from 'next'
|
import { NextPage, NextPageContext } from 'next'
|
||||||
|
import { ParsedUrlQuery } from 'querystring'
|
||||||
import Container from '../../components/Container'
|
import Container from '../../components/Container'
|
||||||
|
import Fetch from '../../utils/Fetch'
|
||||||
|
|
||||||
const Bots:NextPage = () => {
|
const Bots:NextPage = () => {
|
||||||
return <Container>
|
return <Container>
|
||||||
@ -7,7 +9,17 @@ const Bots:NextPage = () => {
|
|||||||
</Container>
|
</Container>
|
||||||
}
|
}
|
||||||
|
|
||||||
export const getServerSideProps: GetServerSideProps = async (context) => {
|
export const getServerSideProps = async (ctx: Context) => {
|
||||||
|
console.log(ctx.query)
|
||||||
return { props: { data: {} } }
|
return { props: { data: {} } }
|
||||||
}
|
}
|
||||||
export default Bots
|
|
||||||
|
export default Bots
|
||||||
|
|
||||||
|
interface Context extends NextPageContext {
|
||||||
|
query: Query
|
||||||
|
}
|
||||||
|
|
||||||
|
interface Query extends ParsedUrlQuery {
|
||||||
|
id: string
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user