chore: formatting
This commit is contained in:
@ -74,34 +74,43 @@ function RelayCacheStats() {
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{Object.entries(counts).sort(([, a], [, b]) => a > b ? -1 : 1).map(([k, v]) => {
|
||||
return (
|
||||
<tr key={k}>
|
||||
<td><FormattedNumber value={Number(k)} /></td>
|
||||
<td><FormattedNumber value={v} /></td>
|
||||
</tr>
|
||||
);
|
||||
})}
|
||||
{Object.entries(counts)
|
||||
.sort(([, a], [, b]) => (a > b ? -1 : 1))
|
||||
.map(([k, v]) => {
|
||||
return (
|
||||
<tr key={k}>
|
||||
<td>
|
||||
<FormattedNumber value={Number(k)} />
|
||||
</td>
|
||||
<td>
|
||||
<FormattedNumber value={v} />
|
||||
</td>
|
||||
</tr>
|
||||
);
|
||||
})}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div className="flex flex-col gap-2">
|
||||
<AsyncButton onClick={() => { }}>
|
||||
<AsyncButton onClick={() => {}}>
|
||||
<FormattedMessage defaultMessage="Clear" id="/GCoTA" />
|
||||
</AsyncButton>
|
||||
<AsyncButton onClick={async () => {
|
||||
const data = await Relay.dump();
|
||||
const url = URL.createObjectURL(new File([data], "snort.db", {
|
||||
type: "application/octet-stream"
|
||||
}));
|
||||
const a = document.createElement("a");
|
||||
a.href = url;
|
||||
a.download = "snort.db";
|
||||
a.click();
|
||||
}}>
|
||||
<AsyncButton
|
||||
onClick={async () => {
|
||||
const data = await Relay.dump();
|
||||
const url = URL.createObjectURL(
|
||||
new File([data], "snort.db", {
|
||||
type: "application/octet-stream",
|
||||
}),
|
||||
);
|
||||
const a = document.createElement("a");
|
||||
a.href = url;
|
||||
a.download = "snort.db";
|
||||
a.click();
|
||||
}}>
|
||||
<FormattedMessage defaultMessage="Dump" id="f2CAxA" />
|
||||
</AsyncButton>
|
||||
</div>
|
||||
</div >
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user