@@ -2,8 +2,11 @@ import { useMemo, useState } from "react";
22import Checkbox from "../../components/Checkbox/Checkbox" ;
33import { useFileNavigation } from "../../contexts/FileNavigationContext" ;
44import { useSelection } from "../../contexts/SelectionContext" ;
5+ import { useTranslation } from "../../contexts/TranslationProvider" ;
56
67const FilesHeader = ( { unselectFiles, onSort, sortConfig } ) => {
8+ const t = useTranslation ( ) ;
9+
710 const [ showSelectAll , setShowSelectAll ] = useState ( false ) ;
811
912 const { selectedFiles, setSelectedFiles } = useSelection ( ) ;
@@ -49,7 +52,7 @@ const FilesHeader = ({ unselectFiles, onSort, sortConfig }) => {
4952 className = { `file-name ${ sortConfig ?. key === "name" ? "active" : "" } ` }
5053 onClick = { ( ) => handleSort ( "name" ) }
5154 >
52- Name
55+ { t ( "name" ) }
5356 { sortConfig ?. key === "name" && (
5457 < span className = "sort-indicator" > { sortConfig . direction === "asc" ? " ▲" : " ▼" } </ span >
5558 ) }
@@ -58,7 +61,7 @@ const FilesHeader = ({ unselectFiles, onSort, sortConfig }) => {
5861 className = { `file-date ${ sortConfig ?. key === "modified" ? "active" : "" } ` }
5962 onClick = { ( ) => handleSort ( "modified" ) }
6063 >
61- Modified
64+ { t ( "modified" ) }
6265 { sortConfig ?. key === "modified" && (
6366 < span className = "sort-indicator" > { sortConfig . direction === "asc" ? " ▲" : " ▼" } </ span >
6467 ) }
@@ -67,7 +70,7 @@ const FilesHeader = ({ unselectFiles, onSort, sortConfig }) => {
6770 className = { `file-size ${ sortConfig ?. key === "size" ? "active" : "" } ` }
6871 onClick = { ( ) => handleSort ( "size" ) }
6972 >
70- Size
73+ { t ( "size" ) }
7174 { sortConfig ?. key === "size" && (
7275 < span className = "sort-indicator" > { sortConfig . direction === "asc" ? " ▲" : " ▼" } </ span >
7376 ) }
@@ -76,4 +79,4 @@ const FilesHeader = ({ unselectFiles, onSort, sortConfig }) => {
7679 ) ;
7780} ;
7881
79- export default FilesHeader ;
82+ export default FilesHeader ;
0 commit comments