mirror of
https://github.com/ConvoyPanel/panel.git
synced 2026-06-17 21:14:25 +08:00
12 lines
332 B
TypeScript
12 lines
332 B
TypeScript
import useSWR from 'swr'
|
|
|
|
|
|
|
|
import getCoterms, { CotermResponse, QueryParams } from "@/api/admin/coterms/getCoterms";
|
|
|
|
|
|
const useCotermsSWR = ({ page, query, ...params }: QueryParams) => {
|
|
return useSWR<CotermResponse>(['admin.coterms', page, query], () => getCoterms({ page, query, ...params }))
|
|
}
|
|
|
|
export default useCotermsSWR |