Update create invite page URL.

This commit is contained in:
ADAMJR 2022-12-20 00:02:22 +00:00
parent e18ade609d
commit 0ae5222b98
4 changed files with 9 additions and 2 deletions

View File

@ -1,6 +1,7 @@
PORT=4200
REACT_APP_API_URL="http://localhost:3000/v2"
REACT_APP_CDN_URL="http://localhost:3000/assets"
REACT_APP_WEBSITE_URL="http://localhost:4200"
REACT_APP_REPO="https://github.com/acrdapp/app"
REACT_APP_VERSION_NAME="Winter"
REACT_APP_VERSION_NUMBER="0.4.1-prerelease"

View File

@ -1,6 +1,7 @@
PORT=4200
REACT_APP_API_URL="https://api.acrd.app/v2"
REACT_APP_CDN_URL="https://api.acrd.app/assets"
REACT_APP_WEBSITE_URL="https://acrd.app"
REACT_APP_REPO="https://github.com/acrdapp/app"
REACT_APP_VERSION_NAME="Winter"
REACT_APP_VERSION_NUMBER="0.4.1-prerelease"

View File

@ -19,10 +19,14 @@ const CreateInvite: React.FunctionComponent = () => {
}, [isOpen, invites]);
const copyCode = () => {
const inviteURL = `${process.env.PUBLIC_URL}/join/${activeInvite?.id}`;
const inviteURL = `${process.env.REACT_APP_WEBSITE_URL}/join/${activeInvite?.id}`;
window.navigator.clipboard.writeText(inviteURL);
}
const shortURL = process.env.REACT_APP_WEBSITE_URL
.replace('https://', '')
.replace('http://', '');
return (activeInvite) ? (
<Modal typeName={'CreateInvite'} className="p-5">
<header className="mb-3">
@ -35,7 +39,7 @@ const CreateInvite: React.FunctionComponent = () => {
onClick={copyCode}
className="float-right py-0">Copy</CircleButton>
<span className="text-lg">
<span className='muted'>{process.env.PUBLIC_URL || 'acrd.app/join/'}</span>
<span className='muted'>{shortURL + '/join/'}</span>
<span className='primary'>{activeInvite?.id}</span>
</span>
</div>

View File

@ -4,6 +4,7 @@ declare global {
PORT: number;
REACT_APP_API_URL: string;
REACT_APP_CDN_URL: string;
REACT_APP_WEBSITE_URL: string;
REACT_APP_REPO: string;
REACT_APP_VERSION_NAME: string;
REACT_APP_VERSION_NUMBER: string;