import EditorRenderer from "@/app/components/richText/EditorRenderer"; import { DistributorsData, GET_DISTRIBUTORS } from "@/graphql/queries/onlineDistributors"; import { useQuery } from "@apollo/client"; const Distributors = () => { const { loading, error, data } = useQuery(GET_DISTRIBUTORS); if (loading) { return (
); } if (error) { return (

Error loading online dealers

{error.message}

); } const pageContent = data?.pages?.edges?.[0]?.node?.content; if (!pageContent) { return (

No online dealers information available.

); } return (
); }; export default Distributors;