-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f0fc371
commit 1883d93
Showing
6 changed files
with
195 additions
and
188 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,29 @@ | ||
import {renderHTML, Module, UnloadedModuleProps} from "@agility/nextjs" | ||
import {getContentItem} from "lib/cms/getContentItem" | ||
import { renderHTML, Module, UnloadedModuleProps } from "@agility/nextjs" | ||
import { getContentItem } from "lib/cms/getContentItem" | ||
|
||
interface RichText { | ||
textblob: string | ||
textblob: string | ||
} | ||
|
||
const RichTextArea = async ({module, languageCode}: UnloadedModuleProps) => { | ||
const { | ||
fields: {textblob}, | ||
contentID, | ||
} = await getContentItem<RichText>({ | ||
contentID: module.contentid, | ||
languageCode, | ||
}) | ||
const RichTextArea = async ({ module, languageCode }: UnloadedModuleProps) => { | ||
const { | ||
fields: { textblob }, | ||
contentID, | ||
} = await getContentItem<RichText>({ | ||
contentID: module.contentid, | ||
languageCode, | ||
}) | ||
|
||
return ( | ||
<section id={`${contentID}`} className="relative px-8" data-agility-component={contentID}> | ||
<div className="max-w-2xl mx-auto my-12 md:mt-18 lg:mt-20"> | ||
<div | ||
data-agility-field="textblob" | ||
data-agility-html | ||
className="my-6 prose prose-sm sm:prose lg:prose-lg xl:prose-xl max-w-full" | ||
dangerouslySetInnerHTML={renderHTML(textblob)} | ||
></div> | ||
</div> | ||
</section> | ||
) | ||
return ( | ||
<section id={`${contentID}`} className="relative px-8"> | ||
<div className="max-w-2xl mx-auto my-12 md:mt-18 lg:mt-20"> | ||
<div | ||
className="my-6 prose prose-sm sm:prose lg:prose-lg xl:prose-xl max-w-full" | ||
dangerouslySetInnerHTML={renderHTML(textblob)} | ||
></div> | ||
</div> | ||
</section> | ||
) | ||
} | ||
|
||
export default RichTextArea |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.