mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-12-02 22:14:50 +00:00
15 lines
369 B
TypeScript
15 lines
369 B
TypeScript
import { useQuery } from '@tanstack/react-query'
|
|
import { client } from '@/ui/api/client'
|
|
|
|
export function useServerFeatures() {
|
|
return useQuery({
|
|
queryKey: ['signup-info'],
|
|
queryFn: async () => {
|
|
const res = await client.api['signup-info'].$get()
|
|
if (!res.ok) return null
|
|
return await res.json()
|
|
},
|
|
staleTime: 5 * 60 * 1000,
|
|
})
|
|
}
|