add referrals levels
This commit is contained in:
@@ -1,49 +1,29 @@
|
||||
import ProtectionSummary from '@/app/ui/marking-page/protection-summary';
|
||||
import FilesTable from '@/app/ui/dashboard/files-table';
|
||||
import PageTitle from '@/app/ui/page-title';
|
||||
import UploadSectionFile from '@/app/components/UploadSectionFile';
|
||||
import { getAllowedFilesExtensions } from '@/app/actions/fileUpload';
|
||||
import { StackedBarChart } from '@/app/components/StackedBarChart';
|
||||
import PageTitleColorFrame from '@/app/ui/page-title-color-frame';
|
||||
import ProtectionStatistic from '@/app/ui/marking-page/new/protection-statistic';
|
||||
|
||||
const data = [
|
||||
{
|
||||
name: 'File A',
|
||||
checks: 4,
|
||||
violations: 2
|
||||
},
|
||||
{
|
||||
name: 'File B',
|
||||
checks: 8,
|
||||
violations: 4
|
||||
},
|
||||
{
|
||||
name: 'File C',
|
||||
checks: 2,
|
||||
violations: 1
|
||||
},
|
||||
{
|
||||
name: 'File D',
|
||||
checks: 7,
|
||||
violations: 1
|
||||
},
|
||||
{
|
||||
name: 'File E',
|
||||
checks: 5,
|
||||
violations: 4
|
||||
},
|
||||
{
|
||||
name: 'File F',
|
||||
checks: 5,
|
||||
violations: 3
|
||||
}
|
||||
];
|
||||
import { fetchReferralUserStats } from '@/app/actions/referralsActions';
|
||||
import { getQueryClient } from '@/app/providers/getQueryClient';
|
||||
|
||||
export default async function Page() {
|
||||
const FILE_TYPE = "document";
|
||||
const { file_extension, max_file_size } = await getAllowedFilesExtensions(FILE_TYPE);
|
||||
|
||||
const queryClient = getQueryClient();
|
||||
|
||||
try {
|
||||
const data = await queryClient.fetchQuery({
|
||||
queryKey: ['referralUserStats'],
|
||||
queryFn: fetchReferralUserStats,
|
||||
});
|
||||
if (data?.referralLink) {
|
||||
return null;
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('Ошибка загрузки статистики рефералов:', error);
|
||||
}
|
||||
|
||||
return (
|
||||
<div>
|
||||
<PageTitleColorFrame
|
||||
@@ -51,14 +31,12 @@ export default async function Page() {
|
||||
description="multi-layered-protection-for-your-audios"
|
||||
/>
|
||||
<ProtectionStatistic fileType={FILE_TYPE} />
|
||||
{/* <div className="split-blocks">
|
||||
<ProtectionSummary fileType={FILE_TYPE} />
|
||||
<div className="protection-overview">
|
||||
<StackedBarChart data={data} />
|
||||
</div>
|
||||
</div> */}
|
||||
<UploadSectionFile fileType={FILE_TYPE} allowedExtensions={file_extension} maxFileSize={max_file_size} />
|
||||
<UploadSectionFile
|
||||
fileType={FILE_TYPE}
|
||||
allowedExtensions={file_extension}
|
||||
maxFileSize={max_file_size}
|
||||
/>
|
||||
<FilesTable fileType={FILE_TYPE} />
|
||||
</div>
|
||||
)
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user