- 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>
25 lines
483 B
TypeScript
25 lines
483 B
TypeScript
import { Row } from '@umami/react-zen';
|
|
import { useMessages } from '@/components/hooks';
|
|
|
|
export interface EmptyProps {
|
|
message?: string;
|
|
}
|
|
|
|
export function Empty({ message }: EmptyProps) {
|
|
const { t, messages } = useMessages();
|
|
|
|
return (
|
|
<Row
|
|
color="muted"
|
|
alignItems="center"
|
|
justifyContent="center"
|
|
width="100%"
|
|
height="100%"
|
|
minHeight="70px"
|
|
flexGrow={1}
|
|
>
|
|
{message || t(messages.noDataAvailable)}
|
|
</Row>
|
|
);
|
|
}
|