Files
penx/hooks/usePostLoading.ts
2024-08-05 10:06:02 +08:00

11 lines
253 B
TypeScript

'use client'
import { atom, useAtom } from 'jotai'
export const postLoadingAtom = atom<boolean>(false)
export function usePostLoading() {
const [isPostLoading, setPostLoading] = useAtom(postLoadingAtom)
return { isPostLoading, setPostLoading }
}