1
0
mirror of https://github.com/tooot-app/app synced 2025-06-05 22:19:13 +02:00

Lots of updates

This commit is contained in:
Zhiyuan Zheng
2021-01-07 19:13:09 +01:00
parent dcb36a682d
commit 4b99813bb7
104 changed files with 2463 additions and 1619 deletions

View File

@ -0,0 +1,24 @@
import client from '@api/client'
import { AxiosError } from 'axios'
import { useQuery, UseQueryOptions } from 'react-query'
export type QueryKey = ['Lists']
const queryFunction = () => {
return client<Mastodon.List[]>({
method: 'get',
instance: 'local',
url: 'lists'
})
}
const hookLists = <TData = Mastodon.List[]>({
options
}: {
options?: UseQueryOptions<Mastodon.List[], AxiosError, TData>
}) => {
const queryKey: QueryKey = ['Lists']
return useQuery(queryKey, queryFunction, options)
}
export default hookLists