mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-16 06:42:14 +00:00
removed useDomainConfig and useSearch contexts from PageContainer (#709)
* removed domain config usage * removed search context * remove search context file
This commit is contained in:
1 parent
d452df2410
commit
b6ad1bb42d
21 files changed
+550
-560
No files matched your search
@@ -7,8 +7,8 @@ import SearchResultsDropdown from "./SearchResultsDropdown";
|
||||
import SearchField from "./SearchField";
|
||||
import "./SearchBar.scss";
|
||||
import { useHistory, useLocation } from "react-router-dom";
|
||||
import { useSearch } from "context/SearchContext";
|
||||
import debounce from "lodash.debounce";
|
||||
import useGlobalSearchStore from "hooks/useGlobalSearchStore";
|
||||
|
||||
interface SearchBarProps {
|
||||
autoFocus?: boolean;
|
||||
@@ -26,7 +26,7 @@ export default function SearchBar({
|
||||
let history = useHistory();
|
||||
let location = useLocation();
|
||||
|
||||
const { searchTerm, setSearchTerm } = useSearch();
|
||||
const { searchTerm, setSearchTerm } = useGlobalSearchStore();
|
||||
const [foundWeights, setFoundWeights] = useState<Weight[]>([]);
|
||||
const [isLoading, setIsLoading] = useState<boolean>(true);
|
||||
const isOnSearchPage = location.pathname.startsWith("/search");
|
||||
|
||||
@@ -32,10 +32,9 @@ import { Logout } from "@storyteller/components/src/api/session/Logout";
|
||||
import { Button } from "components/common";
|
||||
import { WebUrl } from "common/WebUrl";
|
||||
import {
|
||||
WebsiteConfig,
|
||||
GetWebsite,
|
||||
Website,
|
||||
} from "@storyteller/components/src/env/GetWebsite";
|
||||
import { useDomainConfig } from "context/DomainConfigContext";
|
||||
|
||||
interface SideNavProps {
|
||||
sessionWrapper: SessionWrapper;
|
||||
@@ -65,7 +64,7 @@ export default function SideNav({
|
||||
const isOnProfilePage = window.location.pathname.includes("/profile/");
|
||||
const isOnBetaKeyRedeemPage =
|
||||
window.location.pathname.includes("/beta-key/redeem");
|
||||
const domain: WebsiteConfig = useDomainConfig();
|
||||
const domain = GetWebsite();
|
||||
|
||||
let history = useHistory();
|
||||
const handleNavLinkClick = () => {
|
||||
|
||||
@@ -27,7 +27,6 @@ import { Link, NavLink, useHistory } from "react-router-dom";
|
||||
import { Logout } from "@storyteller/components/src/api/session/Logout";
|
||||
import { useLocalize, useModal, useSession } from "hooks";
|
||||
import { InferenceJobsModal } from "components/modals";
|
||||
import { useDomainConfig } from "context/DomainConfigContext";
|
||||
import NavItem from "../../common/NavItem/NavItem";
|
||||
import ProfileDropdown from "components/common/ProfileDropdown";
|
||||
import "./TopNav.scss";
|
||||
@@ -35,10 +34,14 @@ import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||
import { faDiscord } from "@fortawesome/free-brands-svg-icons";
|
||||
import { GetDiscordLink } from "@storyteller/components/src/env/GetDiscordLink";
|
||||
import { WebUrl } from "common/WebUrl";
|
||||
import {
|
||||
GetWebsite,
|
||||
Website,
|
||||
} from "@storyteller/components/src/env/GetWebsite";
|
||||
|
||||
export default function TopNav() {
|
||||
const { queryAppState, sessionWrapper, user } = useSession();
|
||||
const domain = useDomainConfig();
|
||||
const domain = GetWebsite();
|
||||
let history = useHistory();
|
||||
const [isMobileSearchBarVisible, setIsMobileSearchBarVisible] =
|
||||
useState(false);
|
||||
@@ -74,7 +77,7 @@ export default function TopNav() {
|
||||
const loggedIn = sessionWrapper.isLoggedIn();
|
||||
const showNavItem =
|
||||
(!loggedIn && (isOnLandingPage || isOnLoginPage || isOnSignUpPage)) ||
|
||||
domain.titlePart === "Storyteller AI";
|
||||
domain.website === Website.StorytellerAi;
|
||||
|
||||
const [mobileMenu, setMobileMenu] = useState("d-none");
|
||||
|
||||
@@ -201,7 +204,7 @@ export default function TopNav() {
|
||||
|
||||
if (pageContentWrapper) {
|
||||
if (
|
||||
(domain.titlePart === "Storyteller AI" && isOnLandingPage) ||
|
||||
(domain.website === Website.StorytellerAi && isOnLandingPage) ||
|
||||
isOnBetaKeyRedeemPage ||
|
||||
isOnCreatorOnboardingPage ||
|
||||
isOnLoginPage ||
|
||||
@@ -215,7 +218,6 @@ export default function TopNav() {
|
||||
}
|
||||
}
|
||||
}, [
|
||||
domain.titlePart,
|
||||
isOnLandingPage,
|
||||
isOnBetaKeyRedeemPage,
|
||||
isOnWaitlistSuccessPage,
|
||||
@@ -224,11 +226,12 @@ export default function TopNav() {
|
||||
isOnSignUpPage,
|
||||
isOnWelcomePage,
|
||||
isOnBetaForm,
|
||||
domain.website,
|
||||
]);
|
||||
|
||||
if (
|
||||
topBarWrapper &&
|
||||
domain.titlePart === "Storyteller AI" &&
|
||||
domain.website === Website.StorytellerAi &&
|
||||
isOnLandingPage
|
||||
) {
|
||||
topBarWrapper.classList.add("topbar-bg-transparent");
|
||||
@@ -240,7 +243,7 @@ export default function TopNav() {
|
||||
const handleScroll = () => {
|
||||
if (
|
||||
topBarWrapper &&
|
||||
domain.titlePart === "Storyteller AI" &&
|
||||
domain.website === Website.StorytellerAi &&
|
||||
isOnLandingPage
|
||||
) {
|
||||
if (window.scrollY > 500) {
|
||||
@@ -256,7 +259,7 @@ export default function TopNav() {
|
||||
return () => {
|
||||
window.removeEventListener("scroll", handleScroll);
|
||||
};
|
||||
}, [domain.titlePart, isOnLandingPage, topBarWrapper]);
|
||||
}, [domain.website, isOnLandingPage, topBarWrapper]);
|
||||
|
||||
if (
|
||||
isOnBetaKeyRedeemPage ||
|
||||
@@ -385,7 +388,7 @@ export default function TopNav() {
|
||||
|
||||
return (
|
||||
<>
|
||||
{/* {domain.titlePart === "Storyteller AI" &&
|
||||
{/* {domain.website === Website.StorytellerAi &&
|
||||
isOnLandingPage &&
|
||||
!isScrolled && (
|
||||
<div
|
||||
@@ -449,7 +452,7 @@ export default function TopNav() {
|
||||
src={domain.logo}
|
||||
alt={`${domain.titlePart}: Cartoon and Celebrity Text to Speech`}
|
||||
height="36"
|
||||
width={domain.titlePart === "FakeYou" ? "155" : "222"}
|
||||
width={domain.website === Website.FakeYou ? "155" : "222"}
|
||||
className="mb-1 d-none d-lg-block"
|
||||
/>
|
||||
<img
|
||||
@@ -461,7 +464,7 @@ export default function TopNav() {
|
||||
/>
|
||||
</Link>
|
||||
|
||||
{domain.titlePart === "FakeYou" && (
|
||||
{domain.website === Website.FakeYou && (
|
||||
<div className="d-none d-lg-block no-wrap">
|
||||
<NavItem
|
||||
icon={faScrewdriverWrench}
|
||||
@@ -489,7 +492,7 @@ export default function TopNav() {
|
||||
<div className="topbar-nav-center">
|
||||
{/* Search Bar */}
|
||||
<div className="d-none d-lg-block">
|
||||
{domain.titlePart === "FakeYou" && (
|
||||
{domain.website === Website.FakeYou && (
|
||||
<>
|
||||
{(!isOnLandingPage &&
|
||||
!isOnLoginPage &&
|
||||
@@ -520,7 +523,7 @@ export default function TopNav() {
|
||||
</div>
|
||||
|
||||
<div className="topbar-nav-right">
|
||||
{domain.titlePart === "Storyteller AI" &&
|
||||
{domain.website === Website.StorytellerAi &&
|
||||
sessionWrapper.canAccessStudio() && (
|
||||
<div className="d-none d-lg-block">
|
||||
<Button
|
||||
@@ -535,9 +538,9 @@ export default function TopNav() {
|
||||
|
||||
<div className="d-flex align-items-center gap-2">
|
||||
<div className="d-none d-lg-flex gap-2">
|
||||
{(domain.titlePart === "FakeYou" ||
|
||||
{(domain.website === Website.FakeYou ||
|
||||
(sessionWrapper.isLoggedIn() &&
|
||||
domain.titlePart === "Storyteller AI")) && (
|
||||
domain.website === Website.StorytellerAi)) && (
|
||||
<Button
|
||||
{...{
|
||||
icon: faClipboardList,
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
import React, { createContext, useContext, ReactNode } from "react";
|
||||
import { GetWebsite } from "@storyteller/components/src/env/GetWebsite";
|
||||
|
||||
const DomainConfigContext = createContext(GetWebsite());
|
||||
|
||||
export const useDomainConfig = () => useContext(DomainConfigContext);
|
||||
|
||||
interface DomainConfigProviderProps {
|
||||
children: ReactNode;
|
||||
}
|
||||
|
||||
export default function DomainConfigProvider({
|
||||
children,
|
||||
}: DomainConfigProviderProps) {
|
||||
const domainConfig = GetWebsite();
|
||||
|
||||
return (
|
||||
<DomainConfigContext.Provider value={domainConfig}>
|
||||
{children}
|
||||
</DomainConfigContext.Provider>
|
||||
);
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
import React, { createContext, useContext, useState } from "react";
|
||||
|
||||
interface SearchContextType {
|
||||
searchTerm: string;
|
||||
setSearchTerm: (value: string) => void;
|
||||
}
|
||||
|
||||
const SearchContext = createContext<SearchContextType>({
|
||||
searchTerm: "",
|
||||
setSearchTerm: () => {},
|
||||
});
|
||||
|
||||
export const useSearch = () => useContext(SearchContext);
|
||||
|
||||
export const SearchProvider: React.FC = ({ children }) => {
|
||||
const [searchTerm, setSearchTerm] = useState<string>("");
|
||||
|
||||
return (
|
||||
<SearchContext.Provider value={{ searchTerm, setSearchTerm }}>
|
||||
{children}
|
||||
</SearchContext.Provider>
|
||||
);
|
||||
};
|
||||
@@ -1,5 +1,4 @@
|
||||
import NotificationContext from "./NotificationContext";
|
||||
import SessionContext from "./SessionContext";
|
||||
import DomainConfigContext from "./DomainConfigContext";
|
||||
|
||||
export { NotificationContext, SessionContext, DomainConfigContext };
|
||||
export { NotificationContext, SessionContext };
|
||||
@@ -0,0 +1 @@
|
||||
export { default } from "./useGlobalSearchStore";
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
import { create } from "zustand";
|
||||
|
||||
interface GlobalSearchState {
|
||||
searchTerm: string;
|
||||
}
|
||||
|
||||
interface SearcherActions {
|
||||
setSearchTerm: (value: string) => void;
|
||||
}
|
||||
|
||||
type GlobalSearchStore = GlobalSearchState & SearcherActions;
|
||||
|
||||
const useGlobalSearchStore = create<GlobalSearchStore>(set => ({
|
||||
searchTerm: "",
|
||||
setSearchTerm: value =>
|
||||
set(() => ({
|
||||
searchTerm: value,
|
||||
})),
|
||||
}));
|
||||
|
||||
export default useGlobalSearchStore;
|
||||
@@ -19,12 +19,10 @@ import { TtsModelViewPage } from "./pages/tts/tts_model_view/TtsModelViewPage";
|
||||
import { TtsResultDeletePage } from "./pages/tts/tts_result_delete/TtsResultDeletePage";
|
||||
import { TtsResultViewPage } from "./pages/tts/tts_result_view/TtsResultViewPage";
|
||||
import { ContributeIndexPage } from "./pages/contribute/ContributeIndexPage";
|
||||
|
||||
import { UploadTtsModelPage } from "./pages/upload/UploadTtsModelPage";
|
||||
import UploadSdWeightPage from "./pages/upload/UploadSdWeightPage";
|
||||
import UploadLoraWeightPage from "./pages/upload/UploadLoraWeightPage";
|
||||
import UploadWorkflowPage from "./pages/upload/UploadWorkflowPage";
|
||||
|
||||
import { W2lResultViewPage } from "./pages/w2l/w2l_result_view/W2lResultViewPage";
|
||||
import { W2lTemplateListPage } from "./pages/w2l/w2l_template_list/W2lTemplateListPage";
|
||||
import { TtsResultEditPage } from "./pages/tts/tts_result_edit/TtsResultEditPage";
|
||||
@@ -78,12 +76,10 @@ import { ModerationJobControlPage } from "./pages/moderation/job_control/Moderat
|
||||
import WeightPage from "./pages/weight/WeightPage";
|
||||
import ExplorePage from "./pages/explore/ExplorePage";
|
||||
import SearchPage from "./pages/search/SearchPage";
|
||||
import { SearchProvider } from "context/SearchContext";
|
||||
import WeightEditPage from "./pages/weight/WeightEditPage";
|
||||
import FbxToGltfPage from "./pages/fbx_to_gltf/FbxToGltfPage";
|
||||
import ScrollToTop from "./_common/ScrollToTop";
|
||||
import TextToImagePage from "./pages/text_to_image/TextToImagePage";
|
||||
import DomainConfigProvider from "context/DomainConfigContext";
|
||||
import DevUpload from "./pages/dev_upload/DevUpload";
|
||||
import DevMediaInput from "./pages/dev_upload/DevMediaInput";
|
||||
import NewTTS from "./pages/audio_gen/tts/NewTTS";
|
||||
@@ -120,477 +116,475 @@ import Lipsync from "./pages/lipsync/Lipsync";
|
||||
|
||||
export default function PageContainer() {
|
||||
return (
|
||||
<DomainConfigProvider>
|
||||
<SearchProvider>
|
||||
<ScrollToTop />
|
||||
<div id="wrapper" className="no-padding">
|
||||
<TopNav />
|
||||
|
||||
<ProfileSidePanel />
|
||||
<Switch>
|
||||
<Route path="/" exact={true}>
|
||||
<LandingPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/comp-lib">
|
||||
<ComponentsLibrary />
|
||||
</Route>
|
||||
<Route path="/firehose">
|
||||
<FirehoseEventListPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/news">
|
||||
<NewsPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/channels">
|
||||
<ChannelsPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/leaderboard">
|
||||
<LeaderboardPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/login">
|
||||
<LoginPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/password-reset/verify">
|
||||
<PasswordResetVerificationPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/password-reset">
|
||||
<PasswordResetEmailPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/profile/:username/edit">
|
||||
<ProfileEditFc />
|
||||
</Route>
|
||||
|
||||
<Route path="/profile/:username/ban">
|
||||
<ProfileBanFc />
|
||||
</Route>
|
||||
|
||||
<Route path="/profile/:username">
|
||||
<ProfilePageV3 />
|
||||
</Route>
|
||||
|
||||
<Route path="/signup">
|
||||
<SignupPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/pricing" exact={true}>
|
||||
<PricingPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/checkout_success" exact={true}>
|
||||
<CheckoutSuccessPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/checkout_cancel" exact={true}>
|
||||
<CheckoutCancelPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/portal_success" exact={true}>
|
||||
<PortalSuccessPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/media/rename/:media_file_token">
|
||||
<MediaRenamePage />
|
||||
</Route>
|
||||
|
||||
<Route path="/media/:token">
|
||||
<MediaPageSwitch />
|
||||
</Route>
|
||||
|
||||
<Route path="/edit-cover-image/:token">
|
||||
<EditCoverImage />
|
||||
</Route>
|
||||
|
||||
<Route path="/explore">
|
||||
<ExplorePage />
|
||||
</Route>
|
||||
|
||||
<Route path="/weight/:weight_token/edit">
|
||||
<WeightEditPage />
|
||||
</Route>
|
||||
|
||||
<Route
|
||||
path="/weight/:weight_token/:maybe_url_slug?"
|
||||
render={props => (
|
||||
<WeightPage key={props.match.params.weight_token} />
|
||||
)}
|
||||
/>
|
||||
|
||||
<Route path="/search/weights">
|
||||
<SearchPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/tts/result/:token/edit">
|
||||
<TtsResultEditPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/tts/result/:token/delete">
|
||||
<TtsResultDeletePage />
|
||||
</Route>
|
||||
|
||||
<Route path="/tts/result/:token">
|
||||
<TtsResultViewPage />
|
||||
</Route>
|
||||
<>
|
||||
<ScrollToTop />
|
||||
<div id="wrapper" className="no-padding">
|
||||
<TopNav />
|
||||
|
||||
<ProfileSidePanel />
|
||||
<Switch>
|
||||
<Route path="/" exact={true}>
|
||||
<LandingPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/comp-lib">
|
||||
<ComponentsLibrary />
|
||||
</Route>
|
||||
<Route path="/firehose">
|
||||
<FirehoseEventListPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/news">
|
||||
<NewsPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/channels">
|
||||
<ChannelsPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/leaderboard">
|
||||
<LeaderboardPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/login">
|
||||
<LoginPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/password-reset/verify">
|
||||
<PasswordResetVerificationPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/password-reset">
|
||||
<PasswordResetEmailPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/profile/:username/edit">
|
||||
<ProfileEditFc />
|
||||
</Route>
|
||||
|
||||
<Route path="/profile/:username/ban">
|
||||
<ProfileBanFc />
|
||||
</Route>
|
||||
|
||||
<Route path="/profile/:username">
|
||||
<ProfilePageV3 />
|
||||
</Route>
|
||||
|
||||
<Route path="/signup">
|
||||
<SignupPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/pricing" exact={true}>
|
||||
<PricingPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/checkout_success" exact={true}>
|
||||
<CheckoutSuccessPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/checkout_cancel" exact={true}>
|
||||
<CheckoutCancelPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/portal_success" exact={true}>
|
||||
<PortalSuccessPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/media/rename/:media_file_token">
|
||||
<MediaRenamePage />
|
||||
</Route>
|
||||
|
||||
<Route path="/media/:token">
|
||||
<MediaPageSwitch />
|
||||
</Route>
|
||||
|
||||
<Route path="/edit-cover-image/:token">
|
||||
<EditCoverImage />
|
||||
</Route>
|
||||
|
||||
<Route path="/explore">
|
||||
<ExplorePage />
|
||||
</Route>
|
||||
|
||||
<Route path="/weight/:weight_token/edit">
|
||||
<WeightEditPage />
|
||||
</Route>
|
||||
|
||||
<Route
|
||||
path="/weight/:weight_token/:maybe_url_slug?"
|
||||
render={props => (
|
||||
<WeightPage key={props.match.params.weight_token} />
|
||||
)}
|
||||
/>
|
||||
|
||||
<Route path="/search/weights">
|
||||
<SearchPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/tts/result/:token/edit">
|
||||
<TtsResultEditPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/tts/result/:token/delete">
|
||||
<TtsResultDeletePage />
|
||||
</Route>
|
||||
|
||||
<Route path="/tts/result/:token">
|
||||
<TtsResultViewPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/tts/:token/edit">
|
||||
<TtsModelEditPage />
|
||||
</Route>
|
||||
<Route path="/tts/:token/edit">
|
||||
<TtsModelEditPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/tts/:token/delete">
|
||||
<TtsModelDeletePage />
|
||||
</Route>
|
||||
<Route path="/tts/:token/delete">
|
||||
<TtsModelDeletePage />
|
||||
</Route>
|
||||
|
||||
<Route path="/tts/:token/categories">
|
||||
<TtsEditCategoriesPage />
|
||||
</Route>
|
||||
<Route path="/tts/:token/categories">
|
||||
<TtsEditCategoriesPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/tts/:token">
|
||||
<TtsModelViewPage />
|
||||
</Route>
|
||||
<Route path="/tts/:token">
|
||||
<TtsModelViewPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/w2l/result/:token/edit">
|
||||
<W2lResultEditPage />
|
||||
</Route>
|
||||
<Route path="/w2l/result/:token/edit">
|
||||
<W2lResultEditPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/w2l/result/:token/delete">
|
||||
<W2lResultDeletePage />
|
||||
</Route>
|
||||
<Route path="/w2l/result/:token/delete">
|
||||
<W2lResultDeletePage />
|
||||
</Route>
|
||||
|
||||
<Route path="/w2l/result/:token">
|
||||
<W2lResultViewPage />
|
||||
</Route>
|
||||
<Route path="/w2l/result/:token">
|
||||
<W2lResultViewPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/w2l/:templateToken/edit">
|
||||
<W2lTemplateEditPage />
|
||||
</Route>
|
||||
<Route path="/w2l/:templateToken/edit">
|
||||
<W2lTemplateEditPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/w2l/:templateToken/approval">
|
||||
<W2lTemplateApprovePage />
|
||||
</Route>
|
||||
<Route path="/w2l/:templateToken/approval">
|
||||
<W2lTemplateApprovePage />
|
||||
</Route>
|
||||
|
||||
<Route path="/w2l/:templateToken/delete">
|
||||
<W2lTemplateDeletePage />
|
||||
</Route>
|
||||
<Route path="/w2l/:templateToken/delete">
|
||||
<W2lTemplateDeletePage />
|
||||
</Route>
|
||||
|
||||
<Route path="/video">
|
||||
<W2lTemplateListPage />
|
||||
</Route>
|
||||
<Route path="/video">
|
||||
<W2lTemplateListPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/upload/tts">
|
||||
<UploadTtsModelPage />
|
||||
</Route>
|
||||
<Route path="/upload/tts">
|
||||
<UploadTtsModelPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/upload/tts_model">
|
||||
<UploadNewTtsModelPage />
|
||||
</Route>
|
||||
<Route path="/upload/tts_model">
|
||||
<UploadNewTtsModelPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/upload/sd">
|
||||
<UploadSdWeightPage />
|
||||
</Route>
|
||||
<Route path="/upload/sd">
|
||||
<UploadSdWeightPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/upload/lora">
|
||||
<UploadLoraWeightPage />
|
||||
</Route>
|
||||
<Route path="/upload/lora">
|
||||
<UploadLoraWeightPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/upload/workflow">
|
||||
<UploadWorkflowPage />
|
||||
</Route>
|
||||
<Route path="/upload/workflow">
|
||||
<UploadWorkflowPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/contribute">
|
||||
<ContributeIndexPage />
|
||||
</Route>
|
||||
<Route path="/contribute">
|
||||
<ContributeIndexPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/moderation/user/list">
|
||||
<ModerationUserListFc />
|
||||
</Route>
|
||||
<Route path="/moderation/user/list">
|
||||
<ModerationUserListFc />
|
||||
</Route>
|
||||
|
||||
<Route path="/moderation/user_feature_flags/:username?">
|
||||
<ModerationUserFeatureFlagsPage />
|
||||
</Route>
|
||||
<Route path="/moderation/user_feature_flags/:username?">
|
||||
<ModerationUserFeatureFlagsPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/moderation/ip_bans/:ipAddress">
|
||||
<ModerationViewIpBanFc />
|
||||
</Route>
|
||||
<Route path="/moderation/ip_bans/:ipAddress">
|
||||
<ModerationViewIpBanFc />
|
||||
</Route>
|
||||
|
||||
<Route path="/moderation/ip_bans">
|
||||
<ModerationIpBanListFc />
|
||||
</Route>
|
||||
<Route path="/moderation/ip_bans">
|
||||
<ModerationIpBanListFc />
|
||||
</Route>
|
||||
|
||||
<Route path="/moderation/voice_stats">
|
||||
<ModerationVoiceStatsFc />
|
||||
</Route>
|
||||
<Route path="/moderation/voice_stats">
|
||||
<ModerationVoiceStatsFc />
|
||||
</Route>
|
||||
|
||||
<Route path="/moderation/job_stats">
|
||||
<ModerationJobStatsFc />
|
||||
</Route>
|
||||
<Route path="/moderation/job_stats">
|
||||
<ModerationJobStatsFc />
|
||||
</Route>
|
||||
|
||||
<Route path="/moderation/job_control">
|
||||
<ModerationJobControlPage />
|
||||
</Route>
|
||||
<Route path="/moderation/job_control">
|
||||
<ModerationJobControlPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/moderation/token_info">
|
||||
<ModerationTokenInfoPage />
|
||||
</Route>
|
||||
<Route path="/moderation/token_info">
|
||||
<ModerationTokenInfoPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/moderation/tts_category/list">
|
||||
<ModerationTtsCategoryListPage />
|
||||
</Route>
|
||||
<Route path="/moderation/tts_category/list">
|
||||
<ModerationTtsCategoryListPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/moderation/tts_category/edit/:token">
|
||||
<ModerationTtsCategoryEditPage />
|
||||
</Route>
|
||||
<Route path="/moderation/tts_category/edit/:token">
|
||||
<ModerationTtsCategoryEditPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/moderation/category/delete/:token">
|
||||
<ModerationCategoryDeletePage />
|
||||
</Route>
|
||||
<Route path="/moderation/category/delete/:token">
|
||||
<ModerationCategoryDeletePage />
|
||||
</Route>
|
||||
|
||||
<Route path="/moderation/approve/w2l_templates">
|
||||
<ModerationPendingW2lTemplatesFc />
|
||||
</Route>
|
||||
<Route path="/moderation/approve/w2l_templates">
|
||||
<ModerationPendingW2lTemplatesFc />
|
||||
</Route>
|
||||
|
||||
<Route path="/moderation">
|
||||
<ModerationPage />
|
||||
</Route>
|
||||
<Route path="/moderation">
|
||||
<ModerationPage />
|
||||
</Route>
|
||||
|
||||
<Route exact={true} path="/clone">
|
||||
<VoiceCloneRequestPage />
|
||||
</Route>
|
||||
<Route exact={true} path="/clone">
|
||||
<VoiceCloneRequestPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/patrons">
|
||||
<PatronPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/product-usage">
|
||||
<ProductUsageInfoPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/voice-conversion/:token/delete">
|
||||
<VcModelDeletePage />
|
||||
</Route>
|
||||
|
||||
<Route path="/voice-conversion/:token/edit">
|
||||
<VcModelEditPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/voice-conversion/:token">
|
||||
<VcModelViewPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/dashboard">
|
||||
<DashboardPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/welcome-to-studio">
|
||||
<WelcomePage />
|
||||
</Route>
|
||||
|
||||
<Route path="/about">
|
||||
<AboutPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/face-animator/:mediaToken?">
|
||||
<FaceAnimator />
|
||||
</Route>
|
||||
|
||||
<Route path="/fbx-to-gltf/:mediaToken?">
|
||||
<FbxToGltfPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/commissions">
|
||||
<CommunityCommissionsPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/terms">
|
||||
<TermsPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/privacy">
|
||||
<PrivacyPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/guide">
|
||||
<GuidePage />
|
||||
</Route>
|
||||
|
||||
<Route path="/old">
|
||||
<VocodesPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/dev-upload">
|
||||
<DevUpload />
|
||||
</Route>
|
||||
|
||||
<Route path="/dev-upload-alt">
|
||||
<DevUploadAlt />
|
||||
</Route>
|
||||
|
||||
<Route path="/dev-media-input">
|
||||
<DevMediaInput />
|
||||
</Route>
|
||||
|
||||
{/* NEW TTS PAGE */}
|
||||
<Route exact path="/tts">
|
||||
<NewTTS />
|
||||
</Route>
|
||||
|
||||
{/* NEW VC PAGE */}
|
||||
<Route exact path="/voice-conversion">
|
||||
<NewVC />
|
||||
</Route>
|
||||
|
||||
{/* NEW LIVE PORTRAIT PAGE */}
|
||||
<Route exact path="/ai-live-portrait">
|
||||
<LivePortrait />
|
||||
</Route>
|
||||
|
||||
<Route exact path="/ai-lip-sync">
|
||||
<Lipsync />
|
||||
</Route>
|
||||
|
||||
<Route exact path="/webcam-acting">
|
||||
<CameraLivePortrait />
|
||||
</Route>
|
||||
|
||||
{/* Route for initial voice creation */}
|
||||
<Route exact path="/voice-designer/create">
|
||||
<VoiceDesignerFormPage />
|
||||
</Route>
|
||||
|
||||
{/* Route for editing the dataset details */}
|
||||
<Route exact path="/voice-designer/dataset/:dataset_token/edit">
|
||||
<VoiceDesignerFormPage />
|
||||
</Route>
|
||||
|
||||
{/* Route for handling dataset token for uploading samples */}
|
||||
<Route exact path="/voice-designer/dataset/:dataset_token/upload">
|
||||
<VoiceDesignerFormPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/voice-designer/voice/:voice_token/edit">
|
||||
<VoiceDesignerVoiceEditPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/voice-designer/voice/:voice_token">
|
||||
<VoiceDesignerUseVoicePage />
|
||||
</Route>
|
||||
|
||||
<Route path="/inference-jobs-list">
|
||||
<InferenceJobsPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/voice-designer">
|
||||
<VoiceDesignerMainPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/style-video/:mediaToken?">
|
||||
<StyleVideo />
|
||||
</Route>
|
||||
|
||||
<Route path="/generate-speech">
|
||||
<GenerateSpeechPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/video-mocap/:mediaToken?">
|
||||
<VideoMocap />
|
||||
</Route>
|
||||
|
||||
<Route path="/text-to-image">
|
||||
<TextToImagePage />
|
||||
</Route>
|
||||
|
||||
<Route path="/character/donald-trump">
|
||||
<NewTrumpTTS />
|
||||
</Route>
|
||||
|
||||
<Route path="/beta/webcam-acting/form">
|
||||
<BetaWebcamActingForm />
|
||||
</Route>
|
||||
|
||||
<Route path="/beta/webcam-acting">
|
||||
<BetaWebcamActingPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/beta/3d-video-compositor/form">
|
||||
<Beta3DVideoCompositorForm />
|
||||
</Route>
|
||||
|
||||
<Route path="/beta/3d-video-compositor">
|
||||
<Beta3DVideoCompositorPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/beta/2d-video-compositor/form">
|
||||
<BetaVideoCompositorForm />
|
||||
</Route>
|
||||
|
||||
<Route path="/beta/2d-video-compositor">
|
||||
<BetaVideoCompositorPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/beta/lip-sync/form">
|
||||
<BetaLipSyncForm />
|
||||
</Route>
|
||||
|
||||
<Route path="/beta/lip-sync">
|
||||
<BetaLipSyncPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/beta/lip-sync/form">
|
||||
<BetaLipSyncForm />
|
||||
</Route>
|
||||
|
||||
<Route path="/studio-mobile-check">
|
||||
<StudioMobileCheckPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/category/create">
|
||||
<CreateCategoryPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/creator-onboarding">
|
||||
<CreatorTypeformPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/welcome">
|
||||
<SignUpSuccessPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/beta-key/create">
|
||||
<CreateBetaKeyPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/beta-key/redeem/success">
|
||||
<RedeemSuccessPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/beta-key/redeem/:token?">
|
||||
<RedeemBetaKeyPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/beta-key/list">
|
||||
<BetaKeysListPage />
|
||||
</Route>
|
||||
|
||||
{/* test page for tools */}
|
||||
<Route path="/dev/tools">
|
||||
<ToolsTestPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/tools">
|
||||
<CreatorToolsPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/waitlist-next-steps">
|
||||
<WaitlistNextStepsPage />
|
||||
</Route>
|
||||
</Switch>
|
||||
</div>
|
||||
</SearchProvider>
|
||||
</DomainConfigProvider>
|
||||
<Route path="/patrons">
|
||||
<PatronPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/product-usage">
|
||||
<ProductUsageInfoPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/voice-conversion/:token/delete">
|
||||
<VcModelDeletePage />
|
||||
</Route>
|
||||
|
||||
<Route path="/voice-conversion/:token/edit">
|
||||
<VcModelEditPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/voice-conversion/:token">
|
||||
<VcModelViewPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/dashboard">
|
||||
<DashboardPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/welcome-to-studio">
|
||||
<WelcomePage />
|
||||
</Route>
|
||||
|
||||
<Route path="/about">
|
||||
<AboutPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/face-animator/:mediaToken?">
|
||||
<FaceAnimator />
|
||||
</Route>
|
||||
|
||||
<Route path="/fbx-to-gltf/:mediaToken?">
|
||||
<FbxToGltfPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/commissions">
|
||||
<CommunityCommissionsPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/terms">
|
||||
<TermsPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/privacy">
|
||||
<PrivacyPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/guide">
|
||||
<GuidePage />
|
||||
</Route>
|
||||
|
||||
<Route path="/old">
|
||||
<VocodesPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/dev-upload">
|
||||
<DevUpload />
|
||||
</Route>
|
||||
|
||||
<Route path="/dev-upload-alt">
|
||||
<DevUploadAlt />
|
||||
</Route>
|
||||
|
||||
<Route path="/dev-media-input">
|
||||
<DevMediaInput />
|
||||
</Route>
|
||||
|
||||
{/* NEW TTS PAGE */}
|
||||
<Route exact path="/tts">
|
||||
<NewTTS />
|
||||
</Route>
|
||||
|
||||
{/* NEW VC PAGE */}
|
||||
<Route exact path="/voice-conversion">
|
||||
<NewVC />
|
||||
</Route>
|
||||
|
||||
{/* NEW LIVE PORTRAIT PAGE */}
|
||||
<Route exact path="/ai-live-portrait">
|
||||
<LivePortrait />
|
||||
</Route>
|
||||
|
||||
<Route exact path="/ai-lip-sync">
|
||||
<Lipsync />
|
||||
</Route>
|
||||
|
||||
<Route exact path="/webcam-acting">
|
||||
<CameraLivePortrait />
|
||||
</Route>
|
||||
|
||||
{/* Route for initial voice creation */}
|
||||
<Route exact path="/voice-designer/create">
|
||||
<VoiceDesignerFormPage />
|
||||
</Route>
|
||||
|
||||
{/* Route for editing the dataset details */}
|
||||
<Route exact path="/voice-designer/dataset/:dataset_token/edit">
|
||||
<VoiceDesignerFormPage />
|
||||
</Route>
|
||||
|
||||
{/* Route for handling dataset token for uploading samples */}
|
||||
<Route exact path="/voice-designer/dataset/:dataset_token/upload">
|
||||
<VoiceDesignerFormPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/voice-designer/voice/:voice_token/edit">
|
||||
<VoiceDesignerVoiceEditPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/voice-designer/voice/:voice_token">
|
||||
<VoiceDesignerUseVoicePage />
|
||||
</Route>
|
||||
|
||||
<Route path="/inference-jobs-list">
|
||||
<InferenceJobsPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/voice-designer">
|
||||
<VoiceDesignerMainPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/style-video/:mediaToken?">
|
||||
<StyleVideo />
|
||||
</Route>
|
||||
|
||||
<Route path="/generate-speech">
|
||||
<GenerateSpeechPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/video-mocap/:mediaToken?">
|
||||
<VideoMocap />
|
||||
</Route>
|
||||
|
||||
<Route path="/text-to-image">
|
||||
<TextToImagePage />
|
||||
</Route>
|
||||
|
||||
<Route path="/character/donald-trump">
|
||||
<NewTrumpTTS />
|
||||
</Route>
|
||||
|
||||
<Route path="/beta/webcam-acting/form">
|
||||
<BetaWebcamActingForm />
|
||||
</Route>
|
||||
|
||||
<Route path="/beta/webcam-acting">
|
||||
<BetaWebcamActingPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/beta/3d-video-compositor/form">
|
||||
<Beta3DVideoCompositorForm />
|
||||
</Route>
|
||||
|
||||
<Route path="/beta/3d-video-compositor">
|
||||
<Beta3DVideoCompositorPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/beta/2d-video-compositor/form">
|
||||
<BetaVideoCompositorForm />
|
||||
</Route>
|
||||
|
||||
<Route path="/beta/2d-video-compositor">
|
||||
<BetaVideoCompositorPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/beta/lip-sync/form">
|
||||
<BetaLipSyncForm />
|
||||
</Route>
|
||||
|
||||
<Route path="/beta/lip-sync">
|
||||
<BetaLipSyncPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/beta/lip-sync/form">
|
||||
<BetaLipSyncForm />
|
||||
</Route>
|
||||
|
||||
<Route path="/studio-mobile-check">
|
||||
<StudioMobileCheckPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/category/create">
|
||||
<CreateCategoryPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/creator-onboarding">
|
||||
<CreatorTypeformPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/welcome">
|
||||
<SignUpSuccessPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/beta-key/create">
|
||||
<CreateBetaKeyPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/beta-key/redeem/success">
|
||||
<RedeemSuccessPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/beta-key/redeem/:token?">
|
||||
<RedeemBetaKeyPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/beta-key/list">
|
||||
<BetaKeysListPage />
|
||||
</Route>
|
||||
|
||||
{/* test page for tools */}
|
||||
<Route path="/dev/tools">
|
||||
<ToolsTestPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/tools">
|
||||
<CreatorToolsPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/waitlist-next-steps">
|
||||
<WaitlistNextStepsPage />
|
||||
</Route>
|
||||
</Switch>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -14,16 +14,19 @@ import {
|
||||
import { ThirdPartyLinks } from "@storyteller/components/src/constants/ThirdPartyLinks";
|
||||
import { useLocalize } from "hooks";
|
||||
import { Container } from "components/common";
|
||||
import { useDomainConfig } from "context/DomainConfigContext";
|
||||
import { GetDiscordLink } from "@storyteller/components/src/env/GetDiscordLink";
|
||||
import { AppStateContext } from "components/providers/AppStateProvider";
|
||||
import {
|
||||
GetWebsite,
|
||||
Website,
|
||||
} from "@storyteller/components/src/env/GetWebsite";
|
||||
|
||||
function FooterNav() {
|
||||
const {
|
||||
appState: { server_info },
|
||||
sessionWrapper,
|
||||
} = useContext(AppStateContext);
|
||||
const domain = useDomainConfig();
|
||||
const domain = GetWebsite();
|
||||
const { t } = useLocalize("Footer");
|
||||
const location = useLocation();
|
||||
//let myDataLink = WebUrl.signupPage();
|
||||
@@ -72,7 +75,7 @@ function FooterNav() {
|
||||
icon: null,
|
||||
},
|
||||
{ link: "/explore", text: "Explore Videos", icon: null },
|
||||
...(domain.titlePart === "FakeYou"
|
||||
...(domain.website === Website.FakeYou
|
||||
? [{ link: "/tools", text: "AI Tools", icon: null }]
|
||||
: []),
|
||||
// { link: "/upload-assets", text: "Upload Assets", icon: null },
|
||||
@@ -143,7 +146,7 @@ function FooterNav() {
|
||||
src={domain.logo}
|
||||
alt={`${domain.titlePart}: Cartoon and Celebrity Text to Speech`}
|
||||
height="36"
|
||||
width={domain.titlePart === "FakeYou" ? "155" : "222"}
|
||||
width={domain.website === Website.FakeYou ? "155" : "222"}
|
||||
/>
|
||||
</Link>
|
||||
<div className="d-flex gap-3 mt-1">
|
||||
|
||||
+2
-2
@@ -2,14 +2,14 @@ import React from "react";
|
||||
|
||||
import { usePrefixedDocumentTitle } from "../../../../../common/UsePrefixedDocumentTitle";
|
||||
import { PosthogClient } from "@storyteller/components/src/analytics/PosthogClient";
|
||||
import { useDomainConfig } from "context/DomainConfigContext";
|
||||
import { GetWebsite } from "@storyteller/components/src/env/GetWebsite";
|
||||
|
||||
interface Props {}
|
||||
|
||||
function PrivacyPage(props: Props) {
|
||||
PosthogClient.recordPageview();
|
||||
usePrefixedDocumentTitle("Privacy Statement");
|
||||
const domain = useDomainConfig();
|
||||
const domain = GetWebsite();
|
||||
|
||||
return (
|
||||
<div>
|
||||
|
||||
@@ -4,14 +4,14 @@ import { ThirdPartyLinks } from "@storyteller/components/src/constants/ThirdPart
|
||||
import { Link } from "react-router-dom";
|
||||
import { usePrefixedDocumentTitle } from "../../../../../common/UsePrefixedDocumentTitle";
|
||||
import { PosthogClient } from "@storyteller/components/src/analytics/PosthogClient";
|
||||
import { useDomainConfig } from "context/DomainConfigContext";
|
||||
import { GetWebsite } from "@storyteller/components/src/env/GetWebsite";
|
||||
|
||||
interface Props {}
|
||||
|
||||
function TermsPage(props: Props) {
|
||||
PosthogClient.recordPageview();
|
||||
|
||||
const domain = useDomainConfig();
|
||||
const domain = GetWebsite();
|
||||
|
||||
usePrefixedDocumentTitle("Terms of Use");
|
||||
|
||||
|
||||
+6
-3
@@ -1,19 +1,22 @@
|
||||
import React from "react";
|
||||
import { Widget } from "@typeform/embed-react";
|
||||
import { useLocation } from "react-router-dom";
|
||||
import { useDomainConfig } from "context/DomainConfigContext";
|
||||
import { usePrefixedDocumentTitle } from "common/UsePrefixedDocumentTitle";
|
||||
import {
|
||||
Website,
|
||||
GetWebsite,
|
||||
} from "@storyteller/components/src/env/GetWebsite";
|
||||
|
||||
export const Beta3DVideoCompositorForm = () => {
|
||||
const location = useLocation();
|
||||
const queryParams = new URLSearchParams(location.search);
|
||||
const email = queryParams.get("email");
|
||||
const domain = useDomainConfig();
|
||||
const domain = GetWebsite();
|
||||
|
||||
const formId = "GIivcXuf?typeform-welcome=0";
|
||||
|
||||
const fullFormUrl = `${formId}?${
|
||||
domain.titlePart === "FakeYou"
|
||||
domain.website === Website.FakeYou
|
||||
? "typeform-source=fakeyou.com"
|
||||
: "typeform-source=storyteller.ai"
|
||||
}&email=${encodeURIComponent(email || "")}`;
|
||||
|
||||
+6
-3
@@ -1,19 +1,22 @@
|
||||
import React from "react";
|
||||
import { Widget } from "@typeform/embed-react";
|
||||
import { useLocation } from "react-router-dom";
|
||||
import { useDomainConfig } from "context/DomainConfigContext";
|
||||
import { usePrefixedDocumentTitle } from "common/UsePrefixedDocumentTitle";
|
||||
import {
|
||||
GetWebsite,
|
||||
Website,
|
||||
} from "@storyteller/components/src/env/GetWebsite";
|
||||
|
||||
export const BetaLipSyncForm = () => {
|
||||
const location = useLocation();
|
||||
const queryParams = new URLSearchParams(location.search);
|
||||
const email = queryParams.get("email");
|
||||
const domain = useDomainConfig();
|
||||
const domain = GetWebsite();
|
||||
|
||||
const formId = "ETlmLSEx?typeform-welcome=0";
|
||||
|
||||
const fullFormUrl = `${formId}?${
|
||||
domain.titlePart === "FakeYou"
|
||||
domain.website === Website.FakeYou
|
||||
? "typeform-source=fakeyou.com"
|
||||
: "typeform-source=storyteller.ai"
|
||||
}&email=${encodeURIComponent(email || "")}`;
|
||||
|
||||
+6
-3
@@ -1,19 +1,22 @@
|
||||
import React from "react";
|
||||
import { Widget } from "@typeform/embed-react";
|
||||
import { useLocation } from "react-router-dom";
|
||||
import { useDomainConfig } from "context/DomainConfigContext";
|
||||
import { usePrefixedDocumentTitle } from "common/UsePrefixedDocumentTitle";
|
||||
import {
|
||||
GetWebsite,
|
||||
Website,
|
||||
} from "@storyteller/components/src/env/GetWebsite";
|
||||
|
||||
export const BetaVideoCompositorForm = () => {
|
||||
const location = useLocation();
|
||||
const queryParams = new URLSearchParams(location.search);
|
||||
const email = queryParams.get("email");
|
||||
const domain = useDomainConfig();
|
||||
const domain = GetWebsite();
|
||||
|
||||
const formId = "aoQgj41v?typeform-welcome=0";
|
||||
|
||||
const fullFormUrl = `${formId}?${
|
||||
domain.titlePart === "FakeYou"
|
||||
domain.website === Website.FakeYou
|
||||
? "typeform-source=fakeyou.com"
|
||||
: "typeform-source=storyteller.ai"
|
||||
}&email=${encodeURIComponent(email || "")}`;
|
||||
|
||||
+6
-3
@@ -1,19 +1,22 @@
|
||||
import React from "react";
|
||||
import { Widget } from "@typeform/embed-react";
|
||||
import { useLocation } from "react-router-dom";
|
||||
import { useDomainConfig } from "context/DomainConfigContext";
|
||||
import { usePrefixedDocumentTitle } from "common/UsePrefixedDocumentTitle";
|
||||
import {
|
||||
GetWebsite,
|
||||
Website,
|
||||
} from "@storyteller/components/src/env/GetWebsite";
|
||||
|
||||
export const BetaWebcamActingForm = () => {
|
||||
const location = useLocation();
|
||||
const queryParams = new URLSearchParams(location.search);
|
||||
const email = queryParams.get("email");
|
||||
const domain = useDomainConfig();
|
||||
const domain = GetWebsite();
|
||||
|
||||
const formId = "ZGXvD5os?typeform-welcome=0";
|
||||
|
||||
const fullFormUrl = `${formId}?${
|
||||
domain.titlePart === "FakeYou"
|
||||
domain.website === Website.FakeYou
|
||||
? "typeform-source=fakeyou.com"
|
||||
: "typeform-source=storyteller.ai"
|
||||
}&email=${encodeURIComponent(email || "")}`;
|
||||
|
||||
@@ -5,12 +5,11 @@ import { Container } from "components/common";
|
||||
// import { AIFaceMirrorCTA } from "components/marketing";
|
||||
import FakeYouLandingHeader from "./fakeyou/FakeYouLandingHeader";
|
||||
import Dashboard from "./Dashboard";
|
||||
import { useDomainConfig } from "context/DomainConfigContext";
|
||||
import "./LandingPage.scss";
|
||||
// import FakeYouLandingBody from "./fakeyou/FakeYouLandingBody";
|
||||
import {
|
||||
WebsiteConfig,
|
||||
Website,
|
||||
GetWebsite,
|
||||
} from "@storyteller/components/src/env/GetWebsite";
|
||||
import PostlaunchLanding from "./storyteller/PostlaunchLanding/PostlaunchLanding";
|
||||
import MentionsSection from "components/common/MentionsSection";
|
||||
@@ -22,7 +21,7 @@ function LandingPage() {
|
||||
|
||||
const { sessionWrapper } = useSession();
|
||||
|
||||
const domain: WebsiteConfig = useDomainConfig();
|
||||
const domain = GetWebsite();
|
||||
|
||||
const webpageTitle =
|
||||
domain.website === Website.FakeYou
|
||||
|
||||
+6
-3
@@ -1,19 +1,22 @@
|
||||
import React from "react";
|
||||
import { Widget } from "@typeform/embed-react";
|
||||
import { useLocation } from "react-router-dom";
|
||||
import { useDomainConfig } from "context/DomainConfigContext";
|
||||
import { set } from "local-storage";
|
||||
import {
|
||||
GetWebsite,
|
||||
Website,
|
||||
} from "@storyteller/components/src/env/GetWebsite";
|
||||
|
||||
export const CreatorTypeformPage = () => {
|
||||
const location = useLocation();
|
||||
const queryParams = new URLSearchParams(location.search);
|
||||
const email = queryParams.get("email");
|
||||
const domain = useDomainConfig();
|
||||
const domain = GetWebsite();
|
||||
|
||||
const formId = "ZQTkv9ha";
|
||||
|
||||
const fullFormUrl = `${formId}?${
|
||||
domain.titlePart === "FakeYou"
|
||||
domain.website === Website.FakeYou
|
||||
? "typeform-source=fakeyou.com"
|
||||
: "typeform-source=storyteller.ai"
|
||||
}&email=${encodeURIComponent(email || "")}`;
|
||||
|
||||
+2
-3
@@ -1,10 +1,9 @@
|
||||
import {
|
||||
GetWebsite,
|
||||
Website,
|
||||
WebsiteConfig,
|
||||
} from "@storyteller/components/src/env/GetWebsite";
|
||||
import { usePrefixedDocumentTitle } from "common/UsePrefixedDocumentTitle";
|
||||
import { Button } from "components/common";
|
||||
import { useDomainConfig } from "context/DomainConfigContext";
|
||||
import React, { useEffect, useRef, useState } from "react";
|
||||
import { useScroll, useTransform, motion } from "framer-motion";
|
||||
import FeatureTitle from "./FeatureTitle";
|
||||
@@ -30,7 +29,7 @@ import { isMobile as isMobileDevice } from "react-device-detect";
|
||||
export default function PostlaunchLanding() {
|
||||
const { sessionWrapper } = useSession();
|
||||
const [imageHeight, setImageHeight] = useState("100vh");
|
||||
const domain: WebsiteConfig = useDomainConfig();
|
||||
const domain = GetWebsite();
|
||||
const { open } = useModal();
|
||||
const openModal = () =>
|
||||
open({
|
||||
|
||||
@@ -5,20 +5,20 @@ import {
|
||||
CreateSessionIsError,
|
||||
CreateSessionIsSuccess,
|
||||
} from "@storyteller/components/src/api/session/CreateSession";
|
||||
import {
|
||||
GoogleCreateAccount,
|
||||
} from "@storyteller/components/src/api/sso/GoogleCreateAccount";
|
||||
import { GoogleCreateAccount } from "@storyteller/components/src/api/sso/GoogleCreateAccount";
|
||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||
import { faUser, faKey } from "@fortawesome/free-solid-svg-icons";
|
||||
|
||||
import { Analytics } from "../../../../common/Analytics";
|
||||
import { usePrefixedDocumentTitle } from "../../../../common/UsePrefixedDocumentTitle";
|
||||
import { PosthogClient } from "@storyteller/components/src/analytics/PosthogClient";
|
||||
import Panel from "components/common/Panel";
|
||||
import { useDomainConfig } from "context/DomainConfigContext";
|
||||
import ScrollingSceneCarousel from "../landing/storyteller/PostlaunchLanding/ScrollingSceneCarousel";
|
||||
import { InjectScript } from "common/InjectScript";
|
||||
import { AppStateContext } from "components/providers/AppStateProvider";
|
||||
import {
|
||||
GetWebsite,
|
||||
Website,
|
||||
} from "@storyteller/components/src/env/GetWebsite";
|
||||
|
||||
// NB: Google Sign In requires a global javascript function
|
||||
declare global {
|
||||
@@ -27,7 +27,7 @@ declare global {
|
||||
|
||||
function LoginPage() {
|
||||
let history = useHistory();
|
||||
const domain = useDomainConfig();
|
||||
const domain = GetWebsite();
|
||||
const { sessionWrapper, queryAppState } = useContext(AppStateContext);
|
||||
const [password, setPassword] = useState("");
|
||||
const [usernameOrEmail, setUsernameOrEmail] = useState("");
|
||||
@@ -90,14 +90,14 @@ function LoginPage() {
|
||||
|
||||
// This function ***MUST*** be attached to global state for the Google library to work.
|
||||
globalThis.handleGoogleCredentialResponse = async (args: any) => {
|
||||
console.log('>>>> Google Sign In Response', args)
|
||||
console.log(">>>> Google Sign In Response", args);
|
||||
|
||||
let response = await GoogleCreateAccount({
|
||||
google_credential: args.credential
|
||||
google_credential: args.credential,
|
||||
});
|
||||
|
||||
console.log('>>> Google Create Account Response', response);
|
||||
}
|
||||
console.log(">>> Google Create Account Response", response);
|
||||
};
|
||||
|
||||
let errorWarning = <span />;
|
||||
if (errorMessage) {
|
||||
@@ -120,7 +120,7 @@ function LoginPage() {
|
||||
<div className="overflow-hidden auth-page-left">
|
||||
<div className="row h-100 g-0">
|
||||
<div className="col-12 col-lg-6 col-xl-7 bg-panel d-flex flex-column align-items-center justify-content-center order-2 order-lg-1 p-5 p-lg-0">
|
||||
{domain.titlePart === "Storyteller AI" ? (
|
||||
{domain.website === Website.StorytellerAi ? (
|
||||
<>
|
||||
<a href="https://storyteller.ai" style={{ marginBottom: "20px" }}>
|
||||
<img
|
||||
@@ -321,7 +321,7 @@ function LoginPage() {
|
||||
// UNCOMMENT WHEN READY TO IMPLEMENT
|
||||
//
|
||||
// const CLIENT_ID = "788843034237-uqcg8tbgofrcf1to37e1bqphd924jaf6.apps.googleusercontent.com";
|
||||
//
|
||||
//
|
||||
// function GoogleLogin() {
|
||||
// return (
|
||||
// // https://developers.google.com/identity/gsi/web/reference/html-reference
|
||||
@@ -332,8 +332,8 @@ function LoginPage() {
|
||||
// data-client_id={CLIENT_ID}
|
||||
// data-callback="handleGoogleCredentialResponse">
|
||||
// </div>
|
||||
// <div
|
||||
// className="g_id_signin"
|
||||
// <div
|
||||
// className="g_id_signin"
|
||||
// data-type="standard"
|
||||
// // Extra configs
|
||||
// data-shape="rectangular"
|
||||
|
||||
@@ -9,7 +9,6 @@ import {
|
||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||
import { faUser, faEnvelope, faKey } from "@fortawesome/free-solid-svg-icons";
|
||||
import { Link, useHistory, useLocation } from "react-router-dom";
|
||||
|
||||
import { Analytics } from "../../../../common/Analytics";
|
||||
import queryString from "query-string";
|
||||
import { WebUrl } from "../../../../common/WebUrl";
|
||||
@@ -17,9 +16,12 @@ import { BeginStripeCheckoutFlow } from "../../../../common/BeginStripeCheckoutF
|
||||
import { usePrefixedDocumentTitle } from "../../../../common/UsePrefixedDocumentTitle";
|
||||
import { PosthogClient } from "@storyteller/components/src/analytics/PosthogClient";
|
||||
import Panel from "components/common/Panel";
|
||||
import { useDomainConfig } from "context/DomainConfigContext";
|
||||
import ScrollingSceneCarousel from "../landing/storyteller/PostlaunchLanding/ScrollingSceneCarousel";
|
||||
import { AppStateContext } from "components/providers/AppStateProvider";
|
||||
import {
|
||||
GetWebsite,
|
||||
Website,
|
||||
} from "@storyteller/components/src/env/GetWebsite";
|
||||
|
||||
enum FieldTriState {
|
||||
EMPTY_FALSE,
|
||||
@@ -29,7 +31,7 @@ enum FieldTriState {
|
||||
|
||||
function SignupPage() {
|
||||
let history = useHistory();
|
||||
const domain = useDomainConfig();
|
||||
const domain = GetWebsite();
|
||||
let location = useLocation();
|
||||
const { sessionWrapper, queryAppState } = useContext(AppStateContext);
|
||||
const queryParams = new URLSearchParams(location.search);
|
||||
@@ -261,7 +263,7 @@ function SignupPage() {
|
||||
const afterSignupRedirect = async () => {
|
||||
const maybeInternalPlanKey = parsedQueryString["sub"] as string | undefined;
|
||||
|
||||
if (domain.titlePart === "FakeYou") {
|
||||
if (domain.website === Website.FakeYou) {
|
||||
if (maybeInternalPlanKey !== undefined) {
|
||||
return await BeginStripeCheckoutFlow(maybeInternalPlanKey);
|
||||
}
|
||||
@@ -273,7 +275,7 @@ function SignupPage() {
|
||||
: redirectLink + "?from=signup"
|
||||
: WebUrl.pricingPageWithReferer("signup");
|
||||
|
||||
if (domain.titlePart === "Storyteller AI") {
|
||||
if (domain.website === Website.StorytellerAi) {
|
||||
redirectUrl = redirectSignUpLink;
|
||||
if (redirectUrl === redirectSignUpLink) {
|
||||
sessionStorage.setItem("redirected", "true");
|
||||
@@ -375,7 +377,7 @@ function SignupPage() {
|
||||
<div className="overflow-hidden auth-page-left">
|
||||
<div className="row h-100 g-0">
|
||||
<div className="col-12 col-lg-6 col-xl-7 bg-panel d-flex flex-column align-items-center justify-content-center order-2 order-lg-1 p-5 p-lg-0">
|
||||
{domain.titlePart === "Storyteller AI" ? (
|
||||
{domain.website === Website.StorytellerAi ? (
|
||||
<>
|
||||
<a href="https://storyteller.ai" style={{ marginBottom: "20px" }}>
|
||||
<img
|
||||
|
||||
Reference in new issue
Block a user