Fix link ignoring app url on even-type (#773)

pull/771/head^2
Eduardo M 2021-09-25 00:09:30 +02:00 committed by GitHub
parent 9e7cb2c0b8
commit 727793af02
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -995,10 +995,10 @@ const EventTypePage = (props: inferSSRProps<typeof getServerSideProps>) => {
<button
onClick={() => {
navigator.clipboard.writeText(
"https://cal.com/" +
(team ? "team/" + team.slug : eventType.users[0].username) +
"/" +
eventType.slug
(`${process.env.NEXT_PUBLIC_APP_URL}/` ?? "https://cal.com/") +
(team ? "team/" + team.slug : eventType.users[0].username) +
"/" +
eventType.slug
);
showToast("Link copied!", "success");
}}