import { useQuery } from '@tanstack/react-query';
import { useClient } from 'hooks/useClient';
export const useLandingPage = () => {
  const apiClient = useClient();

  const { data: setupData, isLoading } = useQuery({
    queryKey: ['LANDING_PAGE_DATA'],
    queryFn: () => apiClient.get<{ registrationOpen: boolean }>('/landing-page-data'),
  });

  return {
    isLoading,
    registrationOpen: setupData?.registrationOpen,
  };
};
