diff --git a/src/components/ProxyCardGroups.tsx b/src/components/ProxyCardGroups.tsx index 579bddf..3113fa0 100644 --- a/src/components/ProxyCardGroups.tsx +++ b/src/components/ProxyCardGroups.tsx @@ -2,7 +2,11 @@ import InfiniteScroll from 'solid-infinite-scroll' import { createMemo, createSignal } from 'solid-js' import ProxyNodeCard from './ProxyNodeCard' -export default (props: { proxies: string[]; now?: string }) => { +export default (props: { + proxies: string[] + now?: string + onClick?: (name: string) => void +}) => { const [maxRender, setMaxRender] = createSignal(30) const proxies = createMemo(() => props.proxies.slice(0, maxRender())) @@ -13,7 +17,13 @@ export default (props: { proxies: string[]; now?: string }) => { next={() => setMaxRender(maxRender() + 30)} > {(proxy) => ( - + { + props.onClick?.(proxy!) + }} + /> )} ) diff --git a/src/pages/Proxies.tsx b/src/pages/Proxies.tsx index 94abb5d..3e243ab 100644 --- a/src/pages/Proxies.tsx +++ b/src/pages/Proxies.tsx @@ -90,7 +90,13 @@ export default () => { ) const content = ( - + { + setProxyGroupByProxyName(proxy, name) + }} + /> ) return (