Skip to content

Commit 24a6e7a

Browse files
committed
feat: update current URL when share button is pressed
1 parent d382787 commit 24a6e7a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/client/App.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -225,9 +225,9 @@ const ShareButton: FC = () => {
225225
.then((res) => res.json());
226226

227227
const { protocol, host } = window.location;
228-
window.navigator.clipboard.writeText(
229-
`${protocol}//${host}/parameters/${id}`,
230-
);
228+
const shareUrl = `${protocol}//${host}/parameters/${id}`;
229+
window.navigator.clipboard.writeText(shareUrl);
230+
window.history.pushState({}, "", shareUrl);
231231

232232
setIsCopied(() => true);
233233
} catch (e) {

0 commit comments

Comments
 (0)