add translate and make refactor

This commit is contained in:
smanylov
2025-12-17 16:41:07 +07:00
parent fd59fb3e5e
commit 9b8cb3b583
13 changed files with 261 additions and 83 deletions
+17 -17
View File
@@ -11,7 +11,7 @@ import {
SortingState,
ColumnFiltersState,
} from '@tanstack/react-table';
import { IconImageFile, IconVideoFile, IconAudioFile, IconEye, IconDownload, IconShield, DoubleArrowRight, ArrowRight, DoubleArrowLeft, ArrowLeft, ArrowUp, ArrowDown, Filter } from '@/app/ui/icons/icons';
import { IconImageFile, IconVideoFile, IconAudioFile, IconEye, IconDownload, IconShield, IconDoubleArrowRight, IconArrowRight, IconDoubleArrowLeft, IconArrowLeft, IconArrowUp, IconArrowDown, IconFilter } from '@/app/ui/icons/icons';
import { useTranslations } from 'next-intl';
import DropDownList from '@/app/components/dropDownList';
@@ -101,14 +101,14 @@ export default function TanstakFilesTable() {
{
column.getIsSorted() === 'asc' ?
<span>
<ArrowUp />
<IconArrowUp />
</span>
: column.getIsSorted() === 'desc' ?
<span>
<ArrowDown />
<IconArrowDown />
</span>
: <span>
<Filter />
<IconFilter />
</span>
}
</button>
@@ -138,14 +138,14 @@ export default function TanstakFilesTable() {
{
column.getIsSorted() === 'asc' ?
<span>
<ArrowUp />
<IconArrowUp />
</span>
: column.getIsSorted() === 'desc' ?
<span>
<ArrowDown />
<IconArrowDown />
</span>
: <span>
<Filter />
<IconFilter />
</span>
}
</button>
@@ -171,14 +171,14 @@ export default function TanstakFilesTable() {
{
column.getIsSorted() === 'asc' ?
<span>
<ArrowUp />
<IconArrowUp />
</span>
: column.getIsSorted() === 'desc' ?
<span>
<ArrowDown />
<IconArrowDown />
</span>
: <span>
<Filter />
<IconFilter />
</span>
}
</button>
@@ -204,14 +204,14 @@ export default function TanstakFilesTable() {
{
column.getIsSorted() === 'asc' ?
<span>
<ArrowUp />
<IconArrowUp />
</span>
: column.getIsSorted() === 'desc' ?
<span>
<ArrowDown />
<IconArrowDown />
</span>
: <span>
<Filter />
<IconFilter />
</span>
}
</button>
@@ -493,14 +493,14 @@ export default function TanstakFilesTable() {
onClick={() => table.firstPage()}
disabled={!table.getCanPreviousPage()}
>
<DoubleArrowLeft />
<IconDoubleArrowLeft />
</button>
<button
className="px-2 py-1 border rounded-md hover:bg-gray-100 disabled:opacity-50 disabled:cursor-not-allowed"
onClick={() => table.previousPage()}
disabled={!table.getCanPreviousPage()}
>
<ArrowLeft />
<IconArrowLeft />
</button>
<div className="flex items-center gap-1">
@@ -536,14 +536,14 @@ export default function TanstakFilesTable() {
onClick={() => table.nextPage()}
disabled={!table.getCanNextPage()}
>
<ArrowRight />
<IconArrowRight />
</button>
<button
className="px-2 py-1 border rounded-md hover:bg-gray-100 disabled:opacity-50 disabled:cursor-not-allowed"
onClick={() => table.lastPage()}
disabled={!table.getCanNextPage()}
>
<DoubleArrowRight />
<IconDoubleArrowRight />
</button>
</div>
</div>