| 1 | import { createEffect, Suspense } from "solid-js"; |
| 2 | import AboutData from "./about.data"; |
| 3 | |
| 4 | export default function About() { |
| 5 | const name = AboutData(); |
| 6 | |
| 7 | createEffect(() => { |
| 8 | console.log(name()); |
| 9 | }); |
| 10 | |
| 11 | return ( |
| 12 | <section class="bg-pink-100 text-gray-700 p-8"> |
| 13 | <h1 class="text-2xl font-bold">About</h1> |
| 14 | |
| 15 | <p class="mt-4">A page all about this website.</p> |
| 16 | |
| 17 | <p> |
| 18 | <span>We love</span> |
| 19 | <Suspense fallback={<span>...</span>}> |
| 20 | <span>&nbsp;{name()}</span> |
| 21 | </Suspense> |
| 22 | </p> |
| 23 | </section> |
| 24 | ); |
| 25 | } |