- 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>
15 lines
518 B
TypeScript
15 lines
518 B
TypeScript
import { useMessages } from '@/components/hooks';
|
|
import { Plus } from '@/components/icons';
|
|
import { DialogButton } from '@/components/input/DialogButton';
|
|
import { PixelEditForm } from './PixelEditForm';
|
|
|
|
export function PixelAddButton({ teamId }: { teamId?: string }) {
|
|
const { t, labels } = useMessages();
|
|
|
|
return (
|
|
<DialogButton icon={<Plus />} label={t(labels.addPixel)} variant="primary" width="600px">
|
|
{({ close }) => <PixelEditForm teamId={teamId} onClose={close} />}
|
|
</DialogButton>
|
|
);
|
|
}
|