import { createMemo } from 'solid-js' import { twMerge } from 'tailwind-merge' import { Latency } from '~/components' import { filterGroupType, formatProxyType } from '~/helpers' import { useProxies } from '~/signals' export const ProxyNodeCard = (props: { proxyName: string isSelected?: boolean onClick?: () => void }) => { const { proxyName, isSelected, onClick } = props const { proxyNodeMap } = useProxies() const proxyNode = createMemo(() => proxyNodeMap()[proxyName]) return (
onClick?.()} data-tip={proxyName} >
{proxyName}
{formatProxyType(proxyNode()?.type)} {filterGroupType(proxyNode()?.type) ? ( {' :: '} {proxyNode()?.xudp && 'x'} {proxyNode()?.udp && 'udp'} ) : ( {proxyNode()?.now} )}
) }