I try to fix the missing locale for this multi language site but I getting this error;
Type 'FC<CustomLinkProps>' is not assignable to type 'ComponentType<LinkProps> | undefined'.
Type 'FunctionComponent<CustomLinkProps>' is not assignable to type 'FunctionComponent<LinkProps>'.
Types of parameters 'props' and 'props' are incompatible.
Type 'LinkProps' is not assignable to type 'CustomLinkProps'.
Welcome to Prismic community, and thanks for reaching out to us.
I'm sorry for the delayed response.
We recommend that developers use <PrismicNextLink> now, which automatically supports all next/link props, including locale. <PrismicLink> should not be used in Next.js projects going forward. With <PrismicNextLink>, there is no need to use <PrismicProvider> in _app.tsx.<PrismicNextLink> is available as of @prismicio/next v1.1.0.
However, I can still provide information about the error and how to fix it. We ultimately recommend developers use <PrismicNextLink> instead. This happens because CustomLink requires a locale prop, but PrismicProvider can't guarantee that a locale will always be provided. The component's props can be edited to make it work:
Note that locale? now has a ? at the end, which marks the property as optional. Using <PrismicLink> with a custom prop will require special syntax to let it know about the props.