fix(plugin-seo): add localized property to MetaTitleComponent (#12751)
### What? I noticed the plugin-seo exported field component MetaTitleComponent was missing a localized field property in the UI. Localization is working, it just wasnt represented in the UI ### Why? This improves the localization UI for plugin-seo ### How? The localized prop wasn't being passed along to the Label component This implementation is a direct copy of the implementation in the MetaDescription https://github.com/payloadcms/payload/blob/main/packages/plugin-seo/src/fields/MetaDescription/MetaDescriptionComponent.tsx Screenshot of issue:  Co-authored-by: Patrick Roelofs <patrick.roelofs@iquality.nl>
This commit is contained in:
@@ -32,7 +32,13 @@ type MetaTitleProps = {
|
||||
|
||||
export const MetaTitleComponent: React.FC<MetaTitleProps> = (props) => {
|
||||
const {
|
||||
field: { label, maxLength: maxLengthFromProps, minLength: minLengthFromProps, required },
|
||||
field: {
|
||||
label,
|
||||
localized,
|
||||
maxLength: maxLengthFromProps,
|
||||
minLength: minLengthFromProps,
|
||||
required,
|
||||
},
|
||||
hasGenerateTitleFn,
|
||||
readOnly,
|
||||
} = props
|
||||
@@ -128,7 +134,9 @@ export const MetaTitleComponent: React.FC<MetaTitleProps> = (props) => {
|
||||
}}
|
||||
>
|
||||
<div className="plugin-seo__field">
|
||||
{Label ?? <FieldLabel label={label} path={path} required={required} />}
|
||||
{Label ?? (
|
||||
<FieldLabel label={label} localized={localized} path={path} required={required} />
|
||||
)}
|
||||
{hasGenerateTitleFn && (
|
||||
<React.Fragment>
|
||||
—
|
||||
|
||||
Reference in New Issue
Block a user