Spaces:
Running
Running
File size: 882 Bytes
c40c75a |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
import React from 'react';
interface ResponseTimeIndicatorProps {
responseTimeMs: number | null;
}
export const ResponseTimeIndicator: React.FC<ResponseTimeIndicatorProps> = ({ responseTimeMs }) => {
if (responseTimeMs === null || responseTimeMs === undefined) return null;
return (
<div className="flex items-center space-x-1 text-xs text-gray-500 font-mono">
<svg
className="w-4 h-4"
viewBox="0 0 24 24"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M12 6V12L16 14M12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2Z"
stroke="currentColor"
strokeWidth="2"
strokeLinecap="round"
strokeLinejoin="round"
/>
</svg>
<span>{responseTimeMs.toFixed(0)}ms</span>
</div>
);
}; |