return marking-document pag for d2c
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "no-copy-frontend",
|
"name": "no-copy-frontend",
|
||||||
"version": "0.56.0",
|
"version": "0.57.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "next dev -p 2999",
|
"dev": "next dev -p 2999",
|
||||||
|
|||||||
@@ -3,26 +3,11 @@ import UploadSectionFile from '@/app/components/UploadSectionFile';
|
|||||||
import { getAllowedFilesExtensions } from '@/app/actions/fileUpload';
|
import { getAllowedFilesExtensions } from '@/app/actions/fileUpload';
|
||||||
import PageTitleColorFrame from '@/app/ui/page-title-color-frame';
|
import PageTitleColorFrame from '@/app/ui/page-title-color-frame';
|
||||||
import ProtectionStatistic from '@/app/ui/marking-page/new/protection-statistic';
|
import ProtectionStatistic from '@/app/ui/marking-page/new/protection-statistic';
|
||||||
import { fetchReferralUserStats } from '@/app/actions/referralsActions';
|
|
||||||
import { getQueryClient } from '@/app/providers/getQueryClient';
|
|
||||||
|
|
||||||
export default async function Page() {
|
export default async function Page() {
|
||||||
const FILE_TYPE = "document";
|
const FILE_TYPE = "document";
|
||||||
const { file_extension, max_file_size } = await getAllowedFilesExtensions(FILE_TYPE);
|
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) {
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<PageTitleColorFrame
|
<PageTitleColorFrame
|
||||||
|
|||||||
@@ -5,9 +5,7 @@ import { usePathname } from 'next/navigation';
|
|||||||
import { useTranslations } from 'next-intl';
|
import { useTranslations } from 'next-intl';
|
||||||
import { useSideMenuStore } from '@/app/stores/sideMenuStore';
|
import { useSideMenuStore } from '@/app/stores/sideMenuStore';
|
||||||
|
|
||||||
export default function DropDownList(
|
export default function DropDownList() {
|
||||||
{ referralLink }: { referralLink: string | null }
|
|
||||||
) {
|
|
||||||
const pathname = usePathname().replace('/en/', '/').replace('/ru/', '/');
|
const pathname = usePathname().replace('/en/', '/').replace('/ru/', '/');
|
||||||
const [dropDownExpanded, setDropDownExpanded] = useState(false);
|
const [dropDownExpanded, setDropDownExpanded] = useState(false);
|
||||||
const t = useTranslations('Global');
|
const t = useTranslations('Global');
|
||||||
@@ -56,9 +54,6 @@ export default function DropDownList(
|
|||||||
</div>
|
</div>
|
||||||
<ul className={`sub-menu ${dropDownExpanded ? 'expanded' : ''}`}>
|
<ul className={`sub-menu ${dropDownExpanded ? 'expanded' : ''}`}>
|
||||||
{links.map((link) => {
|
{links.map((link) => {
|
||||||
if (referralLink && link.name === 'document-marking') {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return (
|
return (
|
||||||
<Link
|
<Link
|
||||||
key={link.name}
|
key={link.name}
|
||||||
|
|||||||
@@ -128,7 +128,7 @@ export default function NavLinks() {
|
|||||||
<p className="">{t('home')}</p>
|
<p className="">{t('home')}</p>
|
||||||
</Link>
|
</Link>
|
||||||
|
|
||||||
<DropDownList referralLink={referralLink} />
|
<DropDownList />
|
||||||
|
|
||||||
{links.map((link) => {
|
{links.map((link) => {
|
||||||
if (!referralLink && link.name === 'referral-program') {
|
if (!referralLink && link.name === 'referral-program') {
|
||||||
|
|||||||
Reference in New Issue
Block a user