diff --git a/src/components/Collapse.tsx b/src/components/Collapse.tsx index b88775b..a958b00 100644 --- a/src/components/Collapse.tsx +++ b/src/components/Collapse.tsx @@ -5,7 +5,7 @@ import { renderInTwoColumns } from '~/signals' type Props = { title: JSX.Element content: JSX.Element - isOpen: boolean | undefined + isOpen?: boolean onCollapse: (collapsed: boolean) => void } diff --git a/src/components/ProxyCardGroups.tsx b/src/components/ProxyCardGroups.tsx index cb18523..a1e8dd8 100644 --- a/src/components/ProxyCardGroups.tsx +++ b/src/components/ProxyCardGroups.tsx @@ -20,7 +20,7 @@ export const ProxyCardGroups = (props: { props.onClick?.(proxy!) : undefined} + onClick={props.onClick && (() => props.onClick?.(proxy))} /> )} diff --git a/src/components/ProxyPreviewDots.tsx b/src/components/ProxyPreviewDots.tsx index 9e2abb5..6655268 100644 --- a/src/components/ProxyPreviewDots.tsx +++ b/src/components/ProxyPreviewDots.tsx @@ -3,10 +3,7 @@ import { twMerge } from 'tailwind-merge' import { Latency } from '~/components' import { latencyQualityMap, useProxies } from '~/signals' -const LatencyDots = (props: { - latency: number | undefined - selected: boolean -}) => { +const LatencyDots = (props: { latency?: number; selected: boolean }) => { let dotClassName = props.selected ? 'bg-white border-4 border-success' : 'bg-success'