From 81c31547ac94bbd3668fe0cd150f5c37ae51422c Mon Sep 17 00:00:00 2001 From: smanylov Date: Thu, 19 Feb 2026 18:49:41 +0700 Subject: [PATCH] add document for tanstak-table filter --- src/app/components/TanstakTable.tsx | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/app/components/TanstakTable.tsx b/src/app/components/TanstakTable.tsx index 0360e14..ec8ead2 100644 --- a/src/app/components/TanstakTable.tsx +++ b/src/app/components/TanstakTable.tsx @@ -23,6 +23,7 @@ import { convertBytes } from '@/app/lib/convertBytes'; import { FileInfoModalWindow } from '@/app/ui/modal-windows/file-info-modal-window'; import { FileMonitoringModalWindow } from '@/app/ui/modal-windows/file-monitoring-modal-window'; import { FileTypeIcon } from '@/app/components/FileTypeIcon'; +import { fetchReferralUserStats } from '@/app/actions/referralsActions'; type FileType = 'image' | 'video' | 'audio'; @@ -136,6 +137,22 @@ export default function TanstakFilesTable({ fileType }: { fileType: string }) { }, }); + const { + data: referralLink + } = useQuery({ + queryKey: ['referralUserStats'], + queryFn: () => { + return fetchReferralUserStats(); + }, + select: (data) => { + if (data?.referralLink) { + return data?.referralLink; + } else { + return null; + } + } + }); + const queryClient = useQueryClient(); // Состояния @@ -682,6 +699,8 @@ export default function TanstakFilesTable({ fileType }: { fileType: string }) { return t('videos') case 'audio': return t('audios') + case 'document': + return t('documents') default: return t('all-types') } @@ -701,6 +720,11 @@ export default function TanstakFilesTable({ fileType }: { fileType: string }) {
  • {t('audios')}
  • + {!referralLink && ( +
  • + {t('documents')} +
  • + )} )}