'use client' /* @refresh reset */ import React, { createContext, useMemo, useState } from 'react' import type { LoadingContextType } from '@/types' export const LoadingContext = createContext(undefined) export const LoadingProvider = ({ children }: { children: React.ReactNode }) => { const [loading, setLoading] = useState(false) const value = useMemo(() => ({ loading, setLoading }), [loading]) return {children} }