import { defineMessages, useIntl } from '../i18n'; const i18n = defineMessages({ recipeLabel: { id: 'recipeHeader.recipeLabel', defaultMessage: 'Recipe', }, }); interface RecipeHeaderProps { title: string; } export function RecipeHeader({ title }: RecipeHeaderProps) { const intl = useIntl(); return (
{intl.formatMessage(i18n.recipeLabel)}{' '} {title}
); }