Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Only encode path of url
  • Loading branch information
regalijan committed Nov 2, 2024
1 parent 60eb7bc commit 941808a
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions app/routes/short-links.tsx
Expand Up @@ -103,17 +103,17 @@ export default function () {
return (
<Tr>
<Td>{entry.destination}</Td>
<Td
onClick={() => {
navigator.clipboard.writeText(
encodeURIComponent(
`https://carcrushe.rs/${entry.path}`,
),
);
alert("Link copied");
}}
>
https://carcrushe.rs/{entry.path}
<Td>
<Link
onClick={async () => {
await navigator.clipboard.writeText(
`https://carcrushe.rs/${encodeURIComponent(entry.path)}`,
);
alert("Link copied");
}}
>
https://carcrushe.rs/{entry.path}
</Link>
</Td>
<Td>
<IconButton
Expand Down

0 comments on commit 941808a

Please sign in to comment.