feat: localize performance

This commit is contained in:
tresabhi committed 2025-01-07 12:47:55 -06:00
1 parent 7dfdf4c11b
commit 9de41529d1
15 files changed
+134 -76

No files matched your search

@@ -4,21 +4,23 @@ import {
CaretUpIcon,
} from '@radix-ui/react-icons';
import { Button, Flex, Table } from '@radix-ui/themes';
import { useLocale } from '../../hooks/useLocale';
import { TankPerformanceSort } from '../../stores/tankPerformanceSort';
import {
TankPerformanceSortTypeNames,
TankPerformanceSortTypeNamesArray,
} from '../../stores/tankPerformanceSort/constants';
import { TankPerformanceSortTypeNamesArray } from '../../stores/tankPerformanceSort/constants';
import { StickyColumnHeaderCell } from '../StickyColumnHeaderCell';
export function Header() {
const sort = TankPerformanceSort.use();
const store = TankPerformanceSort.useStore();
const { strings } = useLocale();
return (
<Table.Header>
<Table.Row align="center">
<StickyColumnHeaderCell>Tank</StickyColumnHeaderCell>
<StickyColumnHeaderCell>
{strings.website.tools.performance.table.tanks.header}
</StickyColumnHeaderCell>
{TankPerformanceSortTypeNamesArray.map((type) => {
const isSelected = sort.type === type;
@@ -42,7 +44,7 @@ export function Header() {
}
}}
>
{TankPerformanceSortTypeNames[type]}
{strings.website.tools.performance.table.stats[type]}
{!isSelected && <CaretSortIcon />}
{isSelected && (