import React from "react";
import { PlusPromoIcon } from "../../components/icons";
import { t } from "../../i18n";
import { WelcomeScreen } from "../../packages/excalidraw/index";
import { isExcalidrawPlusSignedUser } from "../app_constants";
export const AppWelcomeScreen: React.FC<{
setCollabDialogShown: (toggle: boolean) => any;
}> = React.memo((props) => {
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.setCollabDialogShown(true)}
/>
{!isExcalidrawPlusSignedUser && (
Try Excalidraw Plus!
)}
);
});