mirror of
https://github.com/tuono-labs/tuono
synced 2026-07-25 12:52:47 -07:00
feat(packages/tuono): improve TuonoRouteProps type (#648)
This commit is contained in:
committed by
GitHub
parent
2301083edc
commit
d562aa87a3
@@ -1,5 +1,5 @@
|
||||
import type { JSX } from 'react'
|
||||
import type { TuonoProps } from 'tuono'
|
||||
import type { TuonoRouteProps } from 'tuono'
|
||||
import { Link } from 'tuono'
|
||||
|
||||
interface IndexProps {
|
||||
@@ -9,7 +9,7 @@ interface IndexProps {
|
||||
export default function IndexPage({
|
||||
data,
|
||||
isLoading,
|
||||
}: TuonoProps<IndexProps>): JSX.Element {
|
||||
}: TuonoRouteProps<IndexProps>): JSX.Element {
|
||||
if (isLoading) {
|
||||
return <h1>Loading...</h1>
|
||||
}
|
||||
@@ -17,8 +17,8 @@ export default function IndexPage({
|
||||
return (
|
||||
<>
|
||||
<h1>TUONO</h1>
|
||||
<h2>{data?.subtitle}</h2>
|
||||
<Link href={'/second-route'}>Routing link</Link>)
|
||||
<h2>{data.subtitle}</h2>
|
||||
<Link href={'/second-route'}>Routing link</Link>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user