fix(proxies): double specialType if statement

This commit is contained in:
kunish 2024-10-10 18:57:35 +08:00
parent 698362f1c7
commit 0c004be98f
No known key found for this signature in database
GPG Key ID: 647A12B4F782C430

View File

@ -18,7 +18,7 @@ export const ProxyNodeCard = (props: {
proxyLatencyTestingMap, proxyLatencyTestingMap,
} = useProxies() } = useProxies()
const supportIPv6 = createMemo( const supportIPv6 = createMemo(
() => proxyIPv6SupportMap()[getNowProxyNodeName(props.proxyName || '')], () => proxyIPv6SupportMap()[getNowProxyNodeName(proxyName || '')],
) )
const proxyNode = createMemo(() => proxyNodeMap()[proxyName]) const proxyNode = createMemo(() => proxyNodeMap()[proxyName])
@ -47,16 +47,12 @@ export const ProxyNodeCard = (props: {
<div class="flex items-center justify-between gap-2"> <div class="flex items-center justify-between gap-2">
<div class="flex items-center gap-2"> <div class="flex items-center gap-2">
<Show when={specialType()}>
<div class="badge badge-primary badge-sm font-bold uppercase"> <div class="badge badge-primary badge-sm font-bold uppercase">
{formatProxyType(proxyNode()?.type)} {formatProxyType(proxyNode()?.type)}
</div> </div>
<Show when={specialType()}> <Show when={specialType()}>
<div class="badge badge-secondary badge-sm"> <div class="badge badge-secondary badge-sm">{specialType()}</div>
{specialType()}
</div>
</Show>
</Show> </Show>
<Show when={supportIPv6()}> <Show when={supportIPv6()}>