'use client' import { useState, useRef } from 'react'; import { PieChartComponent } from '@/app/components/PieChartComponent'; import { useTranslations } from 'next-intl'; import Link from 'next/link'; import { useClickOutside } from '@/app/hooks/useClickOutside'; const data = [ { name: 'images', value: 33, color: '#f08c00' }, { name: 'videos', value: 50, color: '#2f9e44' }, { name: 'audios', value: 25, color: '#1971c2' }, ]; /* нужно что бы включать выключать кнопки добавления маркировок */ const totalFiles = 1; export default function ProtectionOverview() { const [isOpen, setIsOpen] = useState(false); const t = useTranslations('Global'); const [openDropDownList, setOpenDropDownList] = useState(false); const dropDownList = useRef(null); useClickOutside(dropDownList, () => { setOpenDropDownList(false) }); return (

{t('protecting-your-content')}

{t('current-status-of')}

{totalFiles ? ( <>
0
{t('total-files')}
0
{t('check')}
0
{t('violations')}
) : (
{t('there-are-no-files-yet')}
{ setOpenDropDownList(!openDropDownList); }} ref={dropDownList} > {t('add')}
{t('photo-marking')} {t('video-marking')} {t('audio-marking')}
)} {isOpen ? (
) : (
0 / 0
{t('disk-space-used')}
)}
{!!totalFiles && ( )}
) }