gitscope
https://dev.kronoz.win/r/marzneshin.git
dashboard/src/modules/users/components/pills/user-data-limit-reached-pill.tsx · v0.7.4
Source
1 d377c4c Dawsh 2y ago import { type FC } from "react";
2 7389ad0 Mardin 2y ago import { BooleanPill } from "@marzneshin/common/components";
3 d377c4c Dawsh 2y ago import { useTranslation } from "react-i18next";
4 e6e6467 Dawsh 2y ago import { UserProp } from "@marzneshin/modules/users";
5 d377c4c Dawsh 2y ago
6 d377c4c Dawsh 2y ago export const UserDataLimitReachedPill: FC<UserProp> = ({ user }) => {
7 d377c4c Dawsh 2y ago const { t } = useTranslation();
8 d377c4c Dawsh 2y ago return (
9 d377c4c Dawsh 2y ago <BooleanPill
10 d377c4c Dawsh 2y ago active={!user.data_limit_reached}
11 d377c4c Dawsh 2y ago activeLabel={t('left')}
12 d377c4c Dawsh 2y ago inactiveLabel={t('reached')}
13 d377c4c Dawsh 2y ago />
14 d377c4c Dawsh 2y ago )
15 d377c4c Dawsh 2y ago }