🔗 Add support for shorter urls (#750)

This commit is contained in:
Luke Vella 2023-07-14 14:27:11 +01:00 committed by GitHub
parent 30a1136529
commit 2e5468ed65
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 16 additions and 5 deletions

View file

@ -8,6 +8,7 @@ import {
DialogTitle,
DialogTrigger,
} from "@rallly/ui/dialog";
import { shortUrl } from "@rallly/utils";
import Link from "next/link";
import React from "react";
import { useCopyToClipboard } from "react-use";
@ -29,7 +30,7 @@ export const InviteDialog = () => {
}
}, [state]);
const inviteLink = `${window.location.origin}/invite/${poll?.id}`;
const inviteLink = shortUrl(`/invite/${poll?.id}`);
const [didCopy, setDidCopy] = React.useState(false);
return (