Magum23
Magum23

Reputation: 33

Strapi corporate starter custom component is not showing

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 External link component screenshot

then I have added it to Page's contectSection enter image description here

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: enter image description here

The problem is that the component is not retreived from strapi to frontend. Console log of all retreived homapage components

Upvotes: 1

Views: 311

Answers (1)

Michal
Michal

Reputation: 26

You need to make change in utils/api.js query

Upvotes: 1

Related Questions