add tacking page
This commit is contained in:
@@ -12,7 +12,7 @@ import {
|
||||
ColumnFiltersState,
|
||||
PaginationState
|
||||
} from '@tanstack/react-table';
|
||||
import {IconDoubleArrowRight, IconArrowRight, IconDoubleArrowLeft, IconArrowLeft, IconArrowUp, IconArrowDown, IconFilter, IconFileDownload, IconInfo, IconEye, IconCheck, IconImageFile, IconLink} from '@/app/ui/icons/icons';
|
||||
import { IconDoubleArrowRight, IconArrowRight, IconDoubleArrowLeft, IconArrowLeft, IconArrowUp, IconArrowDown, IconFilter, IconFileDownload, IconInfo, IconEye, IconCheck, IconImageFile, IconLink } from '@/app/ui/icons/icons';
|
||||
import { useTranslations, useLocale } from 'next-intl';
|
||||
import DropDownList from '@/app/components/DropDownList';
|
||||
import { useQuery, useQueryClient } from '@tanstack/react-query';
|
||||
@@ -76,7 +76,7 @@ const cutFileExtension = (fileName: string) => {
|
||||
return extension;
|
||||
}
|
||||
|
||||
export default function TanstakFilesTable({ fileType }: { fileType: string }) {
|
||||
export default function TanstakFilesTable({ fileType, showFileLink }: { fileType: string, showFileLink?: boolean }) {
|
||||
|
||||
const [sorting, setSorting] = useState<SortingState>([]);
|
||||
const [dateFilter, setDateFilter] = useState<string>('month');
|
||||
@@ -572,7 +572,7 @@ export default function TanstakFilesTable({ fileType }: { fileType: string }) {
|
||||
>
|
||||
<IconEye />
|
||||
</Link>
|
||||
{row.original.fileType === 'document' && (
|
||||
{(showFileLink && row.original.fileType === 'document') && (
|
||||
<Link
|
||||
href={`/watch-doc?docid=${row.original.id}`}
|
||||
className="bg-indigo-500 hover:bg-indigo-600"
|
||||
@@ -785,6 +785,8 @@ export default function TanstakFilesTable({ fileType }: { fileType: string }) {
|
||||
return t('protected-video')
|
||||
case 'audio':
|
||||
return t('protected-audio')
|
||||
case 'document':
|
||||
return t('protected-document')
|
||||
default:
|
||||
return t('table-description')
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user