Files
tuono/examples/tuono-app/src/routes/index.tsx
T

49 lines
1.1 KiB
TypeScript
Raw Normal View History

import type { JSX } from 'react'
2024-05-29 21:54:21 +02:00
import type { TuonoProps } from 'tuono'
2024-06-06 19:15:07 +02:00
interface IndexProps {
2024-06-02 21:24:43 +02:00
subtitle: string
2024-05-29 21:54:21 +02:00
}
2024-06-06 19:15:07 +02:00
2024-05-29 21:54:21 +02:00
export default function IndexPage({
data,
isLoading,
}: TuonoProps<IndexProps>): JSX.Element {
if (isLoading) {
return <h1>Loading...</h1>
}
return (
<>
2024-06-02 21:24:43 +02:00
<header className="header">
<a href="https://crates.io/crates/tuono" target="_blank">
Crates
</a>
<a href="https://www.npmjs.com/package/tuono" target="_blank">
Npm
</a>
</header>
<div className="title-wrap">
<h1 className="title">
TU<span>O</span>NO
</h1>
<div className="logo">
<img src="rust.svg" className="rust" />
<img src="react.svg" className="react" />
</div>
</div>
<div className="subtitle-wrap">
<p className="subtitle">{data?.subtitle}</p>
2024-06-06 19:15:07 +02:00
<a
href="https://github.com/Valerioageno/tuono"
target="_blank"
className="button"
type="button"
>
2024-06-02 21:24:43 +02:00
Github
</a>
</div>
2024-05-29 21:54:21 +02:00
</>
)
2024-05-26 19:05:19 +02:00
}