Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const { getMessage } = props;
return <p>{getMessage('world')}</p>;
}
function LocalizedLabelWithNamedParamsComponent(props) {
const { getMessageWithNamedParams } = props;
return <p>{getMessageWithNamedParams('greeting.with.name', { name: 'John Doe' })}</p>
}
LocalizedLabelComponent.propTypes = propTypes;
PrefixedLocalizedLabelComponent.propTypes = propTypes;
LocalizedLabelWithNamedParamsComponent.propTypes = propTypes;
export const LocalizedLabel = withMessages(LocalizedLabelComponent);
export const LocalizedLabelCurried = withMessages()(LocalizedLabelComponent);
export const PrefixedLocalizedLabel = withMessages('hello')(PrefixedLocalizedLabelComponent);
export const LocalizedLabelWithNamedParams = withMessages(LocalizedLabelWithNamedParamsComponent);
return <p>{getMessage('world')}</p>;
}
function LocalizedLabelWithNamedParamsComponent(props) {
const { getMessageWithNamedParams } = props;
return <p>{getMessageWithNamedParams('greeting.with.name', { name: 'John Doe' })}</p>
}
LocalizedLabelComponent.propTypes = propTypes;
PrefixedLocalizedLabelComponent.propTypes = propTypes;
LocalizedLabelWithNamedParamsComponent.propTypes = propTypes;
export const LocalizedLabel = withMessages(LocalizedLabelComponent);
export const LocalizedLabelCurried = withMessages()(LocalizedLabelComponent);
export const PrefixedLocalizedLabel = withMessages('hello')(PrefixedLocalizedLabelComponent);
export const LocalizedLabelWithNamedParams = withMessages(LocalizedLabelWithNamedParamsComponent);
function PrefixedLocalizedLabelComponent(props) {
const { getMessage } = props;
return <p>{getMessage('world')}</p>;
}
function LocalizedLabelWithNamedParamsComponent(props) {
const { getMessageWithNamedParams } = props;
return <p>{getMessageWithNamedParams('greeting.with.name', { name: 'John Doe' })}</p>
}
LocalizedLabelComponent.propTypes = propTypes;
PrefixedLocalizedLabelComponent.propTypes = propTypes;
LocalizedLabelWithNamedParamsComponent.propTypes = propTypes;
export const LocalizedLabel = withMessages(LocalizedLabelComponent);
export const LocalizedLabelCurried = withMessages()(LocalizedLabelComponent);
export const PrefixedLocalizedLabel = withMessages('hello')(PrefixedLocalizedLabelComponent);
export const LocalizedLabelWithNamedParams = withMessages(LocalizedLabelWithNamedParamsComponent);