Files
blitzkit/packages/bot/src/components/NoData/index.tsx
T

30 lines
690 B
TypeScript
Raw Normal View History

2024-03-06 16:26:36 -06:00
import { Locale } from 'discord.js';
2024-03-12 23:36:56 -05:00
import { translator } from '../../core/localization/translator';
import { theme } from '../../stitches.config';
2023-06-06 01:31:16 +00:00
2024-03-12 23:36:56 -05:00
interface NoDataProps {
2024-03-20 18:03:00 -05:00
type:
| 'battles_in_period'
| 'players_in_period'
| 'tanks_found'
| 'battles_in_season';
2024-03-06 16:26:36 -06:00
locale: Locale;
2023-06-06 01:31:16 +00:00
}
2024-09-08 10:11:24 -05:00
export function NoData({ type, locale }: NoDataProps) {
2025-01-16 13:48:13 -06:00
const { strings } = translator(locale);
2023-06-06 01:31:16 +00:00
return (
<div
style={{
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
}}
>
<span style={{ fontSize: 16, color: theme.colors.textLowContrast }}>
2025-01-16 13:48:13 -06:00
{strings.bot.common.no_data[type]}
2023-06-06 01:31:16 +00:00
</span>
</div>
);
}