Only encode path of url

This commit is contained in:
Regalijan 2024-11-02 01:01:52 -04:00
parent 60eb7bca64
commit 941808a67a
Signed by: regalijan
GPG Key ID: 5D4196DA269EF520

View File

@ -103,17 +103,17 @@ export default function () {
return ( return (
<Tr> <Tr>
<Td>{entry.destination}</Td> <Td>{entry.destination}</Td>
<Td <Td>
onClick={() => { <Link
navigator.clipboard.writeText( onClick={async () => {
encodeURIComponent( await navigator.clipboard.writeText(
`https://carcrushe.rs/${entry.path}`, `https://carcrushe.rs/${encodeURIComponent(entry.path)}`,
),
); );
alert("Link copied"); alert("Link copied");
}} }}
> >
https://carcrushe.rs/{entry.path} https://carcrushe.rs/{entry.path}
</Link>
</Td> </Td>
<Td> <Td>
<IconButton <IconButton