Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add copy report button
  • Loading branch information
regalijan committed Dec 17, 2024
1 parent f8d7f7f commit 621dbed
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions app/routes/events-team_.report.tsx
@@ -1,4 +1,5 @@
import {
Button,
Container,
Heading,
Table,
Expand Down Expand Up @@ -132,6 +133,23 @@ export default function () {
</Tbody>
</Table>
</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>
);
}

0 comments on commit 621dbed

Please sign in to comment.