Typescript support

This commit is contained in:
rocketdebris 2026-05-27 08:47:53 -04:00
parent 354175ff2f
commit 0712a629a9
5 changed files with 40 additions and 7 deletions

View file

@ -1,7 +1,9 @@
import { useState } from 'react';
import type { PicsumData } from '../api/picsum';
// A Card, rendering an image and toggling photographer information when clicked
export function PhotoCard({ data }) {
export function PhotoCard({ data }: {data: PicsumData}) {
const [infoToggled, setInfoToggled] = useState(false);
function handleClick() {