← marzneshin
/
v0.5.4
/
dashboard/src/features/users/components/no-service-alert/index.tsx
https://dev.kronoz.win/r/marzneshin.git
1import { useServicesQuery } from '@marzneshin/features/services';
2import { Link } from '@tanstack/react-router'
3import { useTranslation } from 'react-i18next';
4import {
5 AlertCard,
6} from '@marzneshin/components';
7
8export const UsersNoServiceAlert = () => {
9 const { t } = useTranslation();
10 const { data } = useServicesQuery({ page: 1, size: 10 });
11 return (data && data.pageCount === 0) && (
12 <AlertCard
13 title={t('page.users.services-alert.title')}
14 desc={
15 <>
16 {t('page.users.services-alert.desc')}
17 <Link className="m-1 font-semibold text-secondary-foreground" to="/services">{t('page.nodes.certificate-alert.click')}</Link>
18 </>
19 }
20 />
21 )
22}
23