diff --git a/src/components/ProxyCardGroups.tsx b/src/components/ProxyCardGroups.tsx index a1e8dd8..371de6d 100644 --- a/src/components/ProxyCardGroups.tsx +++ b/src/components/ProxyCardGroups.tsx @@ -1,5 +1,4 @@ -import InfiniteScroll from 'solid-infinite-scroll' -import { createMemo, createSignal } from 'solid-js' +import { For } from 'solid-js' import { ProxyNodeCard } from '~/components' export const ProxyCardGroups = (props: { @@ -7,15 +6,8 @@ export const ProxyCardGroups = (props: { now?: string onClick?: (name: string) => void }) => { - const [maxRender, setMaxRender] = createSignal(100) - const proxyNames = createMemo(() => props.proxyNames.slice(0, maxRender())) - return ( - setMaxRender(maxRender() + 30)} - > + {(proxy) => ( props.onClick?.(proxy))} /> )} - + ) } diff --git a/src/pages/Proxies.tsx b/src/pages/Proxies.tsx index d380d62..b36303f 100644 --- a/src/pages/Proxies.tsx +++ b/src/pages/Proxies.tsx @@ -224,13 +224,11 @@ export default () => { ) - const content = - return ( } onCollapse={(val) => setCollapsedMap(proxyProvider.name, val)} /> ) @@ -286,21 +284,19 @@ export default () => { ) - const content = ( - { - void onProxyNodeClick(proxy, name) - }} - /> - ) - return ( { + void onProxyNodeClick(proxy, name) + }} + /> + } onCollapse={(val) => setCollapsedMap(proxy.name, val)} /> )