Skip to content

Commit

Permalink
Merge pull request Expensify#38604 from narefyev91/add-invite-link-in…
Browse files Browse the repository at this point in the history
…side-share-worskpace

Change invite link inside share Workspace
  • Loading branch information
luacmartins authored Mar 20, 2024
2 parents 4891fe3 + 7436d79 commit bc89304
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/pages/workspace/WorkspaceProfileSharePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import ContextMenuItem from '@components/ContextMenuItem';
import HeaderWithBackButton from '@components/HeaderWithBackButton';
import * as Expensicons from '@components/Icon/Expensicons';
import MenuItem from '@components/MenuItem';
import {useSession} from '@components/OnyxProvider';
import QRShareWithDownload from '@components/QRShare/QRShareWithDownload';
import type QRShareWithDownloadHandle from '@components/QRShare/QRShareWithDownload/types';
import ScreenWrapper from '@components/ScreenWrapper';
Expand All @@ -29,12 +30,15 @@ function WorkspaceProfileSharePage({policy}: WithPolicyProps) {
const {environmentURL} = useEnvironment();
const qrCodeRef = useRef<QRShareWithDownloadHandle>(null);
const {isSmallScreenWidth} = useWindowDimensions();
const session = useSession();

const policyName = policy?.name ?? '';
const id = policy?.id ?? '';
const adminEmail = session?.email ?? '';
const urlWithTrailingSlash = Url.addTrailingForwardSlash(environmentURL);

const url = `${urlWithTrailingSlash}${ROUTES.WORKSPACE_PROFILE.getRoute(id)}`;
const url = `${urlWithTrailingSlash}${ROUTES.WORKSPACE_JOIN_USER.getRoute(id, adminEmail)}`;

return (
<ScreenWrapper
testID={WorkspaceProfileSharePage.displayName}
Expand Down

0 comments on commit bc89304

Please sign in to comment.