Update create invite page URL.
This commit is contained in:
parent
e18ade609d
commit
0ae5222b98
1
frontend/env/.env.dev
vendored
1
frontend/env/.env.dev
vendored
@ -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"
|
||||
|
1
frontend/env/.env.prod
vendored
1
frontend/env/.env.prod
vendored
@ -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"
|
||||
|
@ -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>
|
||||
|
1
frontend/types/dotenv.d.ts
vendored
1
frontend/types/dotenv.d.ts
vendored
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user