
interface DisplayResultsProps {
    results: readonly { name: string, description: string}[]
}

export default function DisplayResults({results}: DisplayResultsProps) {
    const list = results
        .map(({name, description}) =>
        <div>
            <p>username: {name}</p>
            <p>description: {description}</p>
        </div>
    )
    return (
        <div>
            {list}
        </div>
    )
}
