- Rewrite messages.ts to plain string key maps (remove MessageDescriptor) - Rewrite useMessages hook to expose t from useTranslations() directly - Rename formatMessage → t across 193 consumer files - Replace custom FormattedMessage component with next-intl t.rich() - Update 52 language files to use rich text tags (<b>, <a>) - Remove all direct imports from @/components/messages in favor of useMessages() Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
19 lines
545 B
TypeScript
19 lines
545 B
TypeScript
import { PageHeader } from '@/components/common/PageHeader';
|
|
import { useMessages, useNavigation } from '@/components/hooks';
|
|
import { WebsiteAddButton } from './WebsiteAddButton';
|
|
|
|
export interface WebsitesHeaderProps {
|
|
allowCreate?: boolean;
|
|
}
|
|
|
|
export function WebsitesHeader({ allowCreate = true }: WebsitesHeaderProps) {
|
|
const { t, labels } = useMessages();
|
|
const { teamId } = useNavigation();
|
|
|
|
return (
|
|
<PageHeader title={t(labels.websites)}>
|
|
{allowCreate && <WebsiteAddButton teamId={teamId} />}
|
|
</PageHeader>
|
|
);
|
|
}
|