mirror of
https://github.com/lukevella/rallly.git
synced 2025-07-23 03:07:25 +02:00
🔗 Add support for shorter urls (#750)
This commit is contained in:
parent
30a1136529
commit
2e5468ed65
5 changed files with 16 additions and 5 deletions
|
@ -12,6 +12,8 @@ const PORT = process.env.PORT || 3000;
|
|||
// Set webServer.url and use.baseURL with the location of the WebServer respecting the correct set port
|
||||
const baseURL = `http://localhost:${PORT}`;
|
||||
|
||||
process.env.NEXT_PUBLIC_BASE_URL = baseURL;
|
||||
|
||||
// Reference: https://playwright.dev/docs/test-configuration
|
||||
const config: PlaywrightTestConfig = {
|
||||
// Artifacts folder where screenshots, videos, and traces are stored.
|
||||
|
|
|
@ -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 (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue