fix: export to plus url (#6980)

This commit is contained in:
David Luzar 2023-09-11 23:13:16 +02:00 committed by GitHub
parent 5302490372
commit 6abf194281
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 20 additions and 5 deletions

View file

@ -26,7 +26,9 @@ export const AppMainMenu: React.FC<{
<MainMenu.Separator />
<MainMenu.ItemLink
icon={PlusPromoIcon}
href="https://plus.excalidraw.com/plus?utm_source=excalidraw&utm_medium=app&utm_content=hamburger"
href={`${
import.meta.env.VITE_APP_PLUS_LP
}/plus?utm_source=excalidraw&utm_medium=app&utm_content=hamburger`}
className="ExcalidrawPlus"
>
Excalidraw+

View file

@ -56,7 +56,9 @@ export const AppWelcomeScreen: React.FC<{
)}
{!isExcalidrawPlusSignedUser && (
<WelcomeScreen.Center.MenuItemLink
href="https://plus.excalidraw.com/plus?utm_source=excalidraw&utm_medium=app&utm_content=welcomeScreenGuest"
href={`${
import.meta.env.VITE_APP_PLUS_LP
}/plus?utm_source=excalidraw&utm_medium=app&utm_content=welcomeScreenGuest`}
shortcut={null}
icon={PlusPromoIcon}
>

View file

@ -69,7 +69,9 @@ export const exportToExcalidrawPlus = async (
}
window.open(
`https://plus.excalidraw.com/import?excalidraw=${id},${encryptionKey}`,
`${
import.meta.env.VITE_APP_PLUS_APP
}/import?excalidraw=${id},${encryptionKey}`,
);
};

View file

@ -197,7 +197,7 @@ exports[`Test MobileMenu > should initialize with welcome screen and hide once u
</button>
<a
class="welcome-screen-menu-item "
href="https://plus.excalidraw.com/plus?utm_source=excalidraw&utm_medium=app&utm_content=welcomeScreenGuest"
href="undefined/plus?utm_source=excalidraw&utm_medium=app&utm_content=welcomeScreenGuest"
rel="noreferrer"
target="_blank"
>

3
src/vite-env.d.ts vendored
View file

@ -47,6 +47,9 @@ interface ImportMetaEnv {
VITE_PKG_VERSION: string;
VITE_IS_EXCALIDRAW_NPM_PACKAGE: string;
VITE_APP_PLUS_LP: string;
VITE_APP_PLUS_APP: string;
VITE_WORKER_ID: string;
MODE: string;
DEV: string;