Reputation: 33
When following official documentation for creating custom components for strapi corporate starter in Next.js Starter github page the created component is not shown on website.
I have created simple component called External link
then I have added it to Page's contectSection
Then I have created React component
import React from "react"
const ExternalLink = ({ data }) => {
return (
<div className="py-10 text-center">
<div className="flex flex-col items-center">
<a href={data.address}>{data.title}</a>
</div>
</div>
)
}
export default ExternalLink
and registered it in sectionComponents in sections.js
ComponentSectionsExternalLink: ExternalLink,
Last step was to add it to page, so I have added it to homepage like so:
The problem is that the component is not retreived from strapi to frontend.
Upvotes: 1
Views: 311