Skip to content

Commit e59c54a

Browse files
authored
fix: center proxy spinner (coder#16621)
Fixes: coder#16615
1 parent 4732f08 commit e59c54a

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

site/src/components/Latency/Latency.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,14 @@ import { getLatencyColor } from "utils/latency";
1010
interface LatencyProps {
1111
latency?: number;
1212
isLoading?: boolean;
13+
size?: number;
1314
}
1415

15-
export const Latency: FC<LatencyProps> = ({ latency, isLoading }) => {
16+
export const Latency: FC<LatencyProps> = ({
17+
latency,
18+
isLoading,
19+
size = 14,
20+
}) => {
1621
const theme = useTheme();
1722
// Always use the no latency color for loading.
1823
const color = getLatencyColor(theme, isLoading ? undefined : latency);
@@ -21,7 +26,7 @@ export const Latency: FC<LatencyProps> = ({ latency, isLoading }) => {
2126
return (
2227
<Tooltip title="Loading latency...">
2328
<CircularProgress
24-
size={14}
29+
size={size}
2530
css={{ marginLeft: "auto" }}
2631
style={{ color }}
2732
/>

site/src/modules/dashboard/Navbar/ProxyMenu.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ export const ProxyMenu: FC<ProxyMenuProps> = ({ proxyContextValue }) => {
9999
<Latency
100100
latency={latencies?.[selectedProxy.id]?.latencyMS}
101101
isLoading={proxyLatencyLoading(selectedProxy)}
102+
size={24}
102103
/>
103104
</div>
104105
) : (

0 commit comments

Comments
 (0)