fix: add i18n keys for Traffic tab, prevent sort mutation

- Add traffic tab/section locale keys to ru, en, zh, fa
- Use spread copy before .sort() to avoid mutating React Query cache
This commit is contained in:
Fringg
2026-03-28 22:52:30 +03:00
parent 4ebc21b348
commit 5d7b94fc48
5 changed files with 42 additions and 2 deletions

View File

@@ -928,7 +928,7 @@ function TrafficTab({ data, isLoading, onRefresh }: TrafficTabProps) {
<p className="mb-2 text-xs font-medium text-dark-400">
{t('admin.remnawave.traffic.inbounds', 'Inbounds')}
</p>
{node.inbounds
{[...node.inbounds]
.sort((a, b) => b.totalBytes - a.totalBytes)
.map((ib) => (
<div
@@ -953,7 +953,7 @@ function TrafficTab({ data, isLoading, onRefresh }: TrafficTabProps) {
<p className="mb-2 text-xs font-medium text-dark-400">
{t('admin.remnawave.traffic.outbounds', 'Outbounds')}
</p>
{node.outbounds
{[...node.outbounds]
.sort((a, b) => b.totalBytes - a.totalBytes)
.map((ob) => (
<div