← marzneshin
/
dashboard/src/modules/users/components/pills/user-data-limit-reached-pill.tsx
/
blame
https://dev.kronoz.win/r/marzneshin.git
| 1 | d377c4c | Dawsh | 2y ago | import { type FC } from "react"; |
| 2 | d377c4c | Dawsh | 2y ago | import { BooleanPill } from "@marzneshin/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 | } |