import { useUpdateRequest } from '../hooks/useUpdateRequest'; import type { HttpRequest } from '../lib/models'; import { Input } from './core/Input'; import { VStack } from './core/Stacks'; interface Props { requestId: string; authentication: HttpRequest['authentication']; } export function BasicAuth({ requestId, authentication }: Props) { const updateRequest = useUpdateRequest(requestId); return ( { updateRequest.mutate((r) => ({ ...r, authentication: { password: r.authentication.password, username }, })); }} /> { updateRequest.mutate((r) => ({ ...r, authentication: { username: r.authentication.username, password }, })); }} /> ); }