Update frontend/src/App.js
Browse files- frontend/src/App.js +8 -2
frontend/src/App.js
CHANGED
@@ -1,5 +1,4 @@
|
|
1 |
import React, { useState, useEffect } from 'react';
|
2 |
-
import { ArrowUpDown } from 'lucide-react';
|
3 |
import _ from 'lodash';
|
4 |
|
5 |
const ScoreBar = ({ score }) => {
|
@@ -63,6 +62,13 @@ function App() {
|
|
63 |
[sortConfig.direction]
|
64 |
);
|
65 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
66 |
if (loading) {
|
67 |
return (
|
68 |
<div className="flex items-center justify-center min-h-screen">
|
@@ -99,7 +105,7 @@ function App() {
|
|
99 |
>
|
100 |
<div className="flex items-center gap-1">
|
101 |
{benchmark}
|
102 |
-
<
|
103 |
</div>
|
104 |
</th>
|
105 |
))}
|
|
|
1 |
import React, { useState, useEffect } from 'react';
|
|
|
2 |
import _ from 'lodash';
|
3 |
|
4 |
const ScoreBar = ({ score }) => {
|
|
|
62 |
[sortConfig.direction]
|
63 |
);
|
64 |
|
65 |
+
const getSortIcon = (key) => {
|
66 |
+
if (sortConfig.key === key) {
|
67 |
+
return sortConfig.direction === 'desc' ? ' ↓' : ' ↑';
|
68 |
+
}
|
69 |
+
return ' ↕';
|
70 |
+
};
|
71 |
+
|
72 |
if (loading) {
|
73 |
return (
|
74 |
<div className="flex items-center justify-center min-h-screen">
|
|
|
105 |
>
|
106 |
<div className="flex items-center gap-1">
|
107 |
{benchmark}
|
108 |
+
<span className="text-gray-500">{getSortIcon(benchmark)}</span>
|
109 |
</div>
|
110 |
</th>
|
111 |
))}
|