import React from "react"; import { loginIcon } from "../../packages/excalidraw/components/icons"; import { useI18n } from "../../packages/excalidraw/i18n"; import { WelcomeScreen } from "../../packages/excalidraw/index"; import { isExcalidrawPlusSignedUser } from "../app_constants"; import { POINTER_EVENTS } from "../../packages/excalidraw/constants"; export const AppWelcomeScreen: React.FC<{ onCollabDialogOpen: () => any; isCollabEnabled: boolean; }> = React.memo((props) => { const { t } = useI18n(); let headingContent; if (isExcalidrawPlusSignedUser) { headingContent = t("welcomeScreen.app.center_heading_plus") .split(/(Excalidraw\+)/) .map((bit, idx) => { if (bit === "Excalidraw+") { return ( Excalidraw+ ); } return bit; }); } else { headingContent = t("welcomeScreen.app.center_heading"); } return ( {t("welcomeScreen.app.menuHint")} {headingContent} {props.isCollabEnabled && ( props.onCollabDialogOpen()} /> )} {!isExcalidrawPlusSignedUser && ( Sign up )} ); });