diff --git a/examples/nextjs/src/components/shared/contentlets.js b/examples/nextjs/src/components/shared/contentlets.js index 1ea66565e9fa..55e057fc6871 100644 --- a/examples/nextjs/src/components/shared/contentlets.js +++ b/examples/nextjs/src/components/shared/contentlets.js @@ -1,7 +1,7 @@ 'use client'; -import React from 'react'; +import { useMemo } from 'react'; import Image from 'next/image'; -import { editContentlet } from '@dotcms/client'; +import { editContentlet, isInsideEditor } from '@dotcms/client'; const dateFormatOptions = { year: 'numeric', @@ -10,27 +10,31 @@ const dateFormatOptions = { }; function Contentlets({ contentlets }) { + const insideEditor = useMemo(isInsideEditor, []); + return (