diff --git a/packages/components/src/env/FakeYouFrontendEnvironment.ts b/packages/components/src/env/FakeYouFrontendEnvironment.ts index 98f4ba4131..ca7e5632c3 100644 --- a/packages/components/src/env/FakeYouFrontendEnvironment.ts +++ b/packages/components/src/env/FakeYouFrontendEnvironment.ts @@ -25,26 +25,26 @@ export class FakeYouFrontendEnvironment { } } - public static getInstance() : FakeYouFrontendEnvironment { + public static getInstance(): FakeYouFrontendEnvironment { if (FakeYouFrontendEnvironment.instance === undefined) { - FakeYouFrontendEnvironment.instance = new FakeYouFrontendEnvironment(); + FakeYouFrontendEnvironment.instance = new FakeYouFrontendEnvironment(); } return FakeYouFrontendEnvironment.instance; } - public useProductionStripePlans() : boolean { + public useProductionStripePlans(): boolean { return this.isProduction() || this.isStaging(); } - public isProduction() : boolean { + public isProduction(): boolean { return this.environment === Environment.Production; } - public isStaging() : boolean { + public isStaging(): boolean { return this.environment === Environment.Staging; } - public isDevelopment() : boolean { + public isDevelopment(): boolean { return this.environment === Environment.Development; } } diff --git a/packages/fakeyou.com/src/components/layout/SideNav/SideNav.tsx b/packages/fakeyou.com/src/components/layout/SideNav/SideNav.tsx index 55514c2d0a..aec522ed57 100644 --- a/packages/fakeyou.com/src/components/layout/SideNav/SideNav.tsx +++ b/packages/fakeyou.com/src/components/layout/SideNav/SideNav.tsx @@ -22,6 +22,7 @@ import { import { WebUrl } from "common/WebUrl"; import { Logout } from "@storyteller/components/src/api/session/Logout"; import { SessionWrapper } from "@storyteller/components/src/session/SessionWrapper"; +import { FakeYouFrontendEnvironment } from "@storyteller/components/src/env/FakeYouFrontendEnvironment"; import { useLocalize } from "hooks"; const DEFAULT_QUEUE_REFRESH_INTERVAL_MILLIS = 15000; @@ -37,7 +38,9 @@ export default function SideNav(props: SideNavProps) { const { t } = useLocalize("SideNav"); let history = useHistory(); const [windowWidth, setWindowWidth] = useState(window.innerWidth); + const fakeYouFrontendEnv = FakeYouFrontendEnvironment.getInstance(); + const isDevelopmentEnv = fakeYouFrontendEnv.isDevelopment() const handleNavLinkClick = () => { const wrapper = document.getElementById("wrapper"); @@ -267,6 +270,21 @@ export default function SideNav(props: SideNavProps) { {t("speechVc")} + {isDevelopmentEnv && ( +
  • + + + {"Voice Designer"} + +
  • + )}
  • {t("videoTitle")}