()
| 94 | }; |
| 95 | |
| 96 | const shuffle = () => { |
| 97 | let shuffled = [...apis]; |
| 98 | for (let i = shuffled.length - 1; i > 0; i--) { |
| 99 | const j = Math.floor(Math.random() * (i + 1)); |
| 100 | [shuffled[i], shuffled[j]] = [shuffled[j], shuffled[i]]; |
| 101 | } |
| 102 | setApis([...shuffled]); |
| 103 | setSort('Random'); |
| 104 | }; |
| 105 | |
| 106 | const reset = () => { |
| 107 | if (canStore) { |