Files
blitzkit/src/components/NoData.tsx
T
2024-03-06 16:26:36 -06:00

33 lines
748 B
TypeScript

import { Locale } from 'discord.js';
import { translator } from '../core/localization/translator';
import { theme } from '../stitches.config';
export enum NoDataType {
BattlesInPeriod,
PlayersInPeriod,
TanksFound,
}
export interface NoDataProps {
type: 'battles_in_period' | 'players_in_period' | 'tanks_found';
locale: Locale;
}
export default function NoData({ type, locale }: NoDataProps) {
const { translate } = translator(locale);
return (
<div
style={{
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
}}
>
<span style={{ fontSize: 16, color: theme.colors.textLowContrast }}>
{translate(`bot.common.no_data.${type}`)}
</span>
</div>
);
}