Add copy report button

This commit is contained in:
Regalijan 2024-12-16 19:32:48 -05:00
parent f8d7f7f176
commit 621dbed30e
Signed by: regalijan
GPG Key ID: 5D4196DA269EF520

View File

@ -1,4 +1,5 @@
import { import {
Button,
Container, Container,
Heading, Heading,
Table, Table,
@ -132,6 +133,23 @@ export default function () {
</Tbody> </Tbody>
</Table> </Table>
</TableContainer> </TableContainer>
<Button
colorScheme="blue"
onClick={async () => {
await navigator.clipboard.writeText(
`local Report = {
${Object.values(data.members)
.map((v) => `[${v.roblox_id}] = ${v.points};`)
.join("\n")}
}`,
);
alert("Report copied.");
}}
pt="16px"
>
Copy Report
</Button>
</Container> </Container>
); );
} }