()
| 19 | }) |
| 20 | |
| 21 | function Home() { |
| 22 | const [names, setNames] = useState<Array<string>>([]) |
| 23 | |
| 24 | useEffect(() => { |
| 25 | getNames().then(setNames) |
| 26 | }, []) |
| 27 | |
| 28 | return ( |
| 29 | <div |
| 30 | className="flex items-center justify-center min-h-screen p-4 text-white" |
| 31 | style={{ |
| 32 | backgroundColor: '#000', |
| 33 | backgroundImage: |
| 34 | 'radial-gradient(ellipse 60% 60% at 0% 100%, #444 0%, #222 60%, #000 100%)', |
| 35 | }} |
| 36 | > |
| 37 | <div className="w-full max-w-2xl p-8 rounded-xl backdrop-blur-md bg-black/50 shadow-xl border-8 border-black/10"> |
| 38 | <h1 className="text-2xl mb-4">Start API Request Demo - Names List</h1> |
| 39 | <ul className="mb-4 space-y-2"> |
| 40 | {names.map((name) => ( |
| 41 | <li |
| 42 | key={name} |
| 43 | className="bg-white/10 border border-white/20 rounded-lg p-3 backdrop-blur-sm shadow-md" |
| 44 | > |
| 45 | <span className="text-lg text-white">{name}</span> |
| 46 | </li> |
| 47 | ))} |
| 48 | </ul> |
| 49 | </div> |
| 50 | </div> |
| 51 | ) |
| 52 | } |
nothing calls this directly
no test coverage detected