mirror of
https://github.com/ConvoyPanel/panel.git
synced 2026-06-14 09:22:45 +08:00
21 lines
428 B
TypeScript
21 lines
428 B
TypeScript
import useSWR from 'swr'
|
|
|
|
import getAttachedNodes, {
|
|
QueryParams,
|
|
} from '@/api/admin/coterms/getAttachedNodes'
|
|
|
|
|
|
const useAttachedNodes = (
|
|
id: number,
|
|
{ page, query, ...params }: QueryParams
|
|
) => {
|
|
return useSWR(['admin.coterms.attachedNodes', id, page, query], () =>
|
|
getAttachedNodes(id, {
|
|
page,
|
|
query,
|
|
...params,
|
|
})
|
|
)
|
|
}
|
|
|
|
export default useAttachedNodes |