2024-03-06 16:26:36 -06:00
|
|
|
import { Locale } from 'discord.js';
|
|
|
|
|
import { translator } from '../core/localization/translator';
|
2023-07-11 19:54:57 +00:00
|
|
|
import { theme } from '../stitches.config';
|
2023-06-06 01:31:16 +00:00
|
|
|
|
|
|
|
|
export enum NoDataType {
|
2023-06-06 16:53:13 +00:00
|
|
|
BattlesInPeriod,
|
|
|
|
|
PlayersInPeriod,
|
|
|
|
|
TanksFound,
|
2023-06-06 01:31:16 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface NoDataProps {
|
2024-03-06 16:26:36 -06:00
|
|
|
type: 'battles_in_period' | 'players_in_period' | 'tanks_found';
|
|
|
|
|
locale: Locale;
|
2023-06-06 01:31:16 +00:00
|
|
|
}
|
|
|
|
|
|
2024-03-06 16:26:36 -06:00
|
|
|
export default function NoData({ type, locale }: NoDataProps) {
|
|
|
|
|
const { translate } = 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 }}>
|
2024-03-06 16:26:36 -06:00
|
|
|
{translate(`bot.common.no_data.${type}`)}
|
2023-06-06 01:31:16 +00:00
|
|
|
</span>
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
}
|