import type { HttpResponse } from '@yaakapp-internal/models'; import { useMemo } from 'react'; import { KeyValueRow, KeyValueRows } from './core/KeyValueRow'; interface Props { response: HttpResponse; } export function ResponseHeaders({ response }: Props) { const sortedHeaders = useMemo( () => [...response.headers].sort((a, b) => a.name.localeCompare(b.name)), [response.headers], ); return (
{sortedHeaders.map((h, i) => ( {h.value} ))}
); }