add(blockRenderer): add blockRenderer component to add link open to a new page
All checks were successful
Deploy Fefan / deploy (push) Successful in 4m40s
All checks were successful
Deploy Fefan / deploy (push) Successful in 4m40s
This commit is contained in:
@@ -1,23 +1,22 @@
|
||||
import getData from "@/api";
|
||||
import { BlocksRenderer } from "@strapi/blocks-react-renderer";
|
||||
import styles from "./style.module.scss";
|
||||
import Email from "@/components/email";
|
||||
export const dynamic = "force-dynamic";
|
||||
import getData from '@/api';
|
||||
import BlockRenderer from '@/components/blockRenderer';
|
||||
import Email from '@/components/email';
|
||||
import styles from './style.module.scss';
|
||||
export const dynamic = 'force-dynamic';
|
||||
|
||||
export async function generateMetadata() {
|
||||
return {
|
||||
metadataBase: `${process.env.NEXT_PUBLIC_ORIGIN}`,
|
||||
title: "Contactez nous !",
|
||||
title: 'Contactez nous !',
|
||||
};
|
||||
}
|
||||
|
||||
export default async function Contact() {
|
||||
const site = await getData("site", {});
|
||||
|
||||
const site = await getData('site', {});
|
||||
const content = site.data?.attributes.contact_text;
|
||||
return (
|
||||
<main className={styles.main}>
|
||||
<article>{content ? <BlocksRenderer content={content} /> : null}</article>
|
||||
<article>{content ? <BlockRenderer content={content} /> : null}</article>
|
||||
{site.data?.attributes.contact_mail ? <Email></Email> : null}
|
||||
</main>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user