mirror of
https://github.com/lukevella/rallly.git
synced 2025-05-19 20:06:19 +02:00
parent
524c74a918
commit
8e7b5a3d93
1 changed files with 5 additions and 1 deletions
|
@ -16,6 +16,7 @@ import { useCopyToClipboard } from "react-use";
|
|||
import { useParticipants } from "@/components/participants-provider";
|
||||
import { Trans } from "@/components/trans";
|
||||
import { usePoll } from "@/contexts/poll";
|
||||
import { isSelfHosted } from "@/utils/constants";
|
||||
|
||||
export const InviteDialog = () => {
|
||||
const { participants } = useParticipants();
|
||||
|
@ -30,7 +31,10 @@ export const InviteDialog = () => {
|
|||
}
|
||||
}, [state]);
|
||||
|
||||
const inviteLink = shortUrl(`/invite/${poll?.id}`);
|
||||
const inviteLink = isSelfHosted
|
||||
? window.location.origin + `/invite/${poll?.id}`
|
||||
: shortUrl(`/invite/${poll?.id}`);
|
||||
|
||||
const [didCopy, setDidCopy] = React.useState(false);
|
||||
|
||||
return (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue