import LegalPages from 'Layout/LegalPages';
import { useEffect } from 'react';
import { useDispatch, useSelector } from 'react-redux';
import {
fetchRefundPolicy,
selectRefundPolicy,
selectRefundPolicyIsLoading,
} from 'store/slices/LegalSlice';
const RefundPolicy = () => {
const dispatch = useDispatch();
const isLoading = useSelector(selectRefundPolicyIsLoading);
const data = useSelector(selectRefundPolicy);
useEffect(() => {
// @ts-ignore
dispatch(fetchRefundPolicy());
}, [dispatch]);
const { blocks, title, updatedAt } = data;
return <LegalPages loading={isLoading} title={title} blocks={blocks} updatedAt={updatedAt} />;
};
export default RefundPolicy;