2026-02-07 12:28:07 +07:00
|
|
|
import FilesTable from '@/app/ui/dashboard/files-table';
|
|
|
|
|
import UploadSectionFile from '@/app/components/UploadSectionFile';
|
|
|
|
|
import { getAllowedFilesExtensions } from '@/app/actions/fileUpload';
|
|
|
|
|
import PageTitleColorFrame from '@/app/ui/page-title-color-frame';
|
|
|
|
|
import ProtectionStatistic from '@/app/ui/marking-page/new/protection-statistic';
|
2026-02-09 13:11:25 +07:00
|
|
|
import { fetchReferralUserStats } from '@/app/actions/referralsActions';
|
|
|
|
|
import { getQueryClient } from '@/app/providers/getQueryClient';
|
2026-02-07 12:28:07 +07:00
|
|
|
|
|
|
|
|
export default async function Page() {
|
|
|
|
|
const FILE_TYPE = "document";
|
|
|
|
|
const { file_extension, max_file_size } = await getAllowedFilesExtensions(FILE_TYPE);
|
|
|
|
|
|
2026-02-09 13:11:25 +07:00
|
|
|
const queryClient = getQueryClient();
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
const data = await queryClient.fetchQuery({
|
|
|
|
|
queryKey: ['referralUserStats'],
|
|
|
|
|
queryFn: fetchReferralUserStats,
|
|
|
|
|
});
|
|
|
|
|
if (data?.referralLink) {
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
} catch (error) {
|
|
|
|
|
}
|
|
|
|
|
|
2026-02-07 12:28:07 +07:00
|
|
|
return (
|
|
|
|
|
<div>
|
|
|
|
|
<PageTitleColorFrame
|
|
|
|
|
title="audio-protection"
|
|
|
|
|
description="multi-layered-protection-for-your-audios"
|
|
|
|
|
/>
|
|
|
|
|
<ProtectionStatistic fileType={FILE_TYPE} />
|
2026-02-09 13:11:25 +07:00
|
|
|
<UploadSectionFile
|
|
|
|
|
fileType={FILE_TYPE}
|
|
|
|
|
allowedExtensions={file_extension}
|
|
|
|
|
maxFileSize={max_file_size}
|
|
|
|
|
/>
|
2026-02-07 12:28:07 +07:00
|
|
|
<FilesTable fileType={FILE_TYPE} />
|
|
|
|
|
</div>
|
2026-02-09 13:11:25 +07:00
|
|
|
);
|
2026-02-07 12:28:07 +07:00
|
|
|
}
|