Skip to content

Commit

Permalink
fix(proxies): double specialType if statement
Browse files Browse the repository at this point in the history
  • Loading branch information
kunish committed Oct 10, 2024
1 parent 698362f commit 0c004be
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions src/components/ProxyNodeCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const ProxyNodeCard = (props: {
proxyLatencyTestingMap,
} = useProxies()
const supportIPv6 = createMemo(
() => proxyIPv6SupportMap()[getNowProxyNodeName(props.proxyName || '')],
() => proxyIPv6SupportMap()[getNowProxyNodeName(proxyName || '')],
)
const proxyNode = createMemo(() => proxyNodeMap()[proxyName])

Expand Down Expand Up @@ -47,16 +47,12 @@ export const ProxyNodeCard = (props: {

<div class="flex items-center justify-between gap-2">
<div class="flex items-center gap-2">
<Show when={specialType()}>
<div class="badge badge-primary badge-sm font-bold uppercase">
{formatProxyType(proxyNode()?.type)}
</div>
<div class="badge badge-primary badge-sm font-bold uppercase">
{formatProxyType(proxyNode()?.type)}
</div>

<Show when={specialType()}>
<div class="badge badge-secondary badge-sm">
{specialType()}
</div>
</Show>
<Show when={specialType()}>
<div class="badge badge-secondary badge-sm">{specialType()}</div>
</Show>

<Show when={supportIPv6()}>
Expand Down

0 comments on commit 0c004be

Please sign in to comment.