import { Box } from "@chakra-ui/react";
import ChakraUIRenderer from "chakra-ui-markdown-renderer";
import useImprint from "lib/Hooks/useImprint";
import { lazy } from "react";
import { theme } from "Styles/customTheme";

const ReactMarkdown = lazy(() => import("react-markdown"));

const SiteImprint = () => {
  const { content, error } = useImprint();

  return (
    <Box>
      <ReactMarkdown
        components={ChakraUIRenderer(theme)}
        children={content}
        skipHtml
      />
    </Box>
  );
};

export default SiteImprint;
