develop
update version of packages
This commit is contained in:
parent
3197fb4ca2
commit
cb56c45c2c
7765
package-lock.json
generated
7765
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -42,7 +42,7 @@
|
|||||||
"react-ga4": "^2.1.0",
|
"react-ga4": "^2.1.0",
|
||||||
"react-helmet": "^6.1.0",
|
"react-helmet": "^6.1.0",
|
||||||
"react-i18next": "^12.3.1",
|
"react-i18next": "^12.3.1",
|
||||||
"react-pdf": "8.0.2",
|
"react-pdf": "^10.2.0",
|
||||||
"react-player": "^2.16.0",
|
"react-player": "^2.16.0",
|
||||||
"react-redux": "^8.0.5",
|
"react-redux": "^8.0.5",
|
||||||
"react-router-dom": "^6.11.2",
|
"react-router-dom": "^6.11.2",
|
||||||
@ -72,7 +72,7 @@
|
|||||||
"postcss": "^8.5.6",
|
"postcss": "^8.5.6",
|
||||||
"terser": "^5.43.1",
|
"terser": "^5.43.1",
|
||||||
"typescript": "^5.0.4",
|
"typescript": "^5.0.4",
|
||||||
"vite": "^4.3.8",
|
"vite": "^7.3.0",
|
||||||
"vite-plugin-svgr": "^4.2.0"
|
"vite-plugin-svgr": "^4.2.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,10 +1,4 @@
|
|||||||
import {
|
import { useState, useEffect, useRef, useMemo, useLayoutEffect } from "react";
|
||||||
useState,
|
|
||||||
useEffect,
|
|
||||||
useRef,
|
|
||||||
useMemo,
|
|
||||||
useLayoutEffect
|
|
||||||
} from "react";
|
|
||||||
import {
|
import {
|
||||||
Routes,
|
Routes,
|
||||||
Route,
|
Route,
|
||||||
@ -150,7 +144,7 @@ import { useSession } from "@/hooks/session/useSession";
|
|||||||
import { getSourceByPathname } from "@/utils/source.utils";
|
import { getSourceByPathname } from "@/utils/source.utils";
|
||||||
import { navigateToAuth } from "@/utils/auth-navigation";
|
import { navigateToAuth } from "@/utils/auth-navigation";
|
||||||
|
|
||||||
import "../palmistry/palmistry-container/palmistry-container.css"
|
import "../palmistry/palmistry-container/palmistry-container.css";
|
||||||
import ProfileRoutes from "@/routerComponents/Profile";
|
import ProfileRoutes from "@/routerComponents/Profile";
|
||||||
import RetainingFunnelRoutes from "@/routerComponents/RetainingFunnel";
|
import RetainingFunnelRoutes from "@/routerComponents/RetainingFunnel";
|
||||||
import { ELocalesPlacement } from "@/locales";
|
import { ELocalesPlacement } from "@/locales";
|
||||||
@ -184,16 +178,16 @@ function App(): JSX.Element {
|
|||||||
unleashClient.updateContext({
|
unleashClient.updateContext({
|
||||||
userId: user?.id || undefined,
|
userId: user?.id || undefined,
|
||||||
properties: {
|
properties: {
|
||||||
source
|
source,
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (session?.[source]) {
|
if (session?.[source]) {
|
||||||
unleashClient.updateContext({
|
unleashClient.updateContext({
|
||||||
sessionId: session?.[source] || undefined,
|
sessionId: session?.[source] || undefined,
|
||||||
properties: {
|
properties: {
|
||||||
source
|
source,
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}, [user, session, source, unleashClient]);
|
}, [user, session, source, unleashClient]);
|
||||||
@ -214,10 +208,14 @@ function App(): JSX.Element {
|
|||||||
|
|
||||||
if (isPageAvailable) {
|
if (isPageAvailable) {
|
||||||
const utm = parseQueryParams();
|
const utm = parseQueryParams();
|
||||||
console.log('App component - parsed UTM on page:', location.pathname, utm);
|
console.log(
|
||||||
|
"App component - parsed UTM on page:",
|
||||||
|
location.pathname,
|
||||||
|
utm
|
||||||
|
);
|
||||||
// Only update UTM if there are new parameters and they're not empty
|
// Only update UTM if there are new parameters and they're not empty
|
||||||
if (Object.keys(utm).length > 0) {
|
if (Object.keys(utm).length > 0) {
|
||||||
console.log('App component - dispatching UTM update:', utm);
|
console.log("App component - dispatching UTM update:", utm);
|
||||||
dispatch(actions.utm.update(utm));
|
dispatch(actions.utm.update(utm));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -293,18 +291,12 @@ function App(): JSX.Element {
|
|||||||
<CookieYesController isDelete={subscriptionStatus === "subscribed"} />
|
<CookieYesController isDelete={subscriptionStatus === "subscribed"} />
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<Route
|
<Route path={`${profilePrefix}/*`} element={<ProfileRoutes />} />
|
||||||
path={`${profilePrefix}/*`}
|
|
||||||
element={<ProfileRoutes />}
|
|
||||||
/>
|
|
||||||
<Route
|
<Route
|
||||||
path={`${retainingFunnelPrefix}/*`}
|
path={`${retainingFunnelPrefix}/*`}
|
||||||
element={<RetainingFunnelRoutes />}
|
element={<RetainingFunnelRoutes />}
|
||||||
/>
|
/>
|
||||||
<Route
|
<Route path={`${anonymousPrefix}/*`} element={<AnonymousRoutes />} />
|
||||||
path={`${anonymousPrefix}/*`}
|
|
||||||
element={<AnonymousRoutes />}
|
|
||||||
/>
|
|
||||||
<Route
|
<Route
|
||||||
path={`${palmistryV1Prefix}/*`}
|
path={`${palmistryV1Prefix}/*`}
|
||||||
element={<PalmistryV1Routes />}
|
element={<PalmistryV1Routes />}
|
||||||
@ -321,7 +313,10 @@ function App(): JSX.Element {
|
|||||||
path={`${compatibilityV4Prefix}/*`}
|
path={`${compatibilityV4Prefix}/*`}
|
||||||
element={<CompatibilityV4Routes />}
|
element={<CompatibilityV4Routes />}
|
||||||
/>
|
/>
|
||||||
<Route path={routes.client.auth()} element={<Auth redirectUrl={routes.client.trialPaymentV1()} />} />
|
<Route
|
||||||
|
path={routes.client.auth()}
|
||||||
|
element={<Auth redirectUrl={routes.client.trialPaymentV1()} />}
|
||||||
|
/>
|
||||||
<Route element={<AuthorizedUserOutlet />}>
|
<Route element={<AuthorizedUserOutlet />}>
|
||||||
<Route
|
<Route
|
||||||
path={`${palmistryV2Prefix}/*`}
|
path={`${palmistryV2Prefix}/*`}
|
||||||
@ -339,9 +334,22 @@ function App(): JSX.Element {
|
|||||||
<Route path={routes.client.skipTrial()} element={<SkipTrial />} />
|
<Route path={routes.client.skipTrial()} element={<SkipTrial />} />
|
||||||
<Route
|
<Route
|
||||||
path={routes.client.addConsultant()}
|
path={routes.client.addConsultant()}
|
||||||
element={<AddConsultant funnel={ELocalesPlacement.V1} paymentPlacement="add_consultant" />}
|
element={
|
||||||
|
<AddConsultant
|
||||||
|
funnel={ELocalesPlacement.V1}
|
||||||
|
paymentPlacement="add_consultant"
|
||||||
|
/>
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
<Route
|
||||||
|
path={routes.client.addGuides()}
|
||||||
|
element={
|
||||||
|
<AddGuides
|
||||||
|
funnel={ELocalesPlacement.V1}
|
||||||
|
paymentPlacement="add_guides"
|
||||||
|
/>
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<Route path={routes.client.addGuides()} element={<AddGuides funnel={ELocalesPlacement.V1} paymentPlacement="add_guides" />} />
|
|
||||||
</Route>
|
</Route>
|
||||||
</Route>
|
</Route>
|
||||||
{/* Additional Purchases Main End */}
|
{/* Additional Purchases Main End */}
|
||||||
@ -377,14 +385,8 @@ function App(): JSX.Element {
|
|||||||
element={<FreePeriodInfoPage />}
|
element={<FreePeriodInfoPage />}
|
||||||
/>
|
/>
|
||||||
<Route path={routes.client.feedback()} element={<FeedbackPage />} />
|
<Route path={routes.client.feedback()} element={<FeedbackPage />} />
|
||||||
<Route
|
<Route path={routes.client.birthtime()} element={<BirthtimePage />} />
|
||||||
path={routes.client.birthtime()}
|
<Route path={routes.client.createProfile()} element={<SkipStep />} />
|
||||||
element={<BirthtimePage />}
|
|
||||||
/>
|
|
||||||
<Route
|
|
||||||
path={routes.client.createProfile()}
|
|
||||||
element={<SkipStep />}
|
|
||||||
/>
|
|
||||||
<Route
|
<Route
|
||||||
path={routes.client.emailEnter()}
|
path={routes.client.emailEnter()}
|
||||||
element={<EmailEnterPage />}
|
element={<EmailEnterPage />}
|
||||||
@ -398,10 +400,7 @@ function App(): JSX.Element {
|
|||||||
element={<AuthResultPage />}
|
element={<AuthResultPage />}
|
||||||
/>
|
/>
|
||||||
{/* <Route path={routes.client.static()} element={<StaticPage />} /> */}
|
{/* <Route path={routes.client.static()} element={<StaticPage />} /> */}
|
||||||
<Route
|
<Route path={routes.client.priceList()} element={<PriceListPage />} />
|
||||||
path={routes.client.priceList()}
|
|
||||||
element={<PriceListPage />}
|
|
||||||
/>
|
|
||||||
</Route>
|
</Route>
|
||||||
{/* <Route element={<AuthorizedUserOutlet />}>
|
{/* <Route element={<AuthorizedUserOutlet />}>
|
||||||
<Route
|
<Route
|
||||||
@ -419,9 +418,7 @@ function App(): JSX.Element {
|
|||||||
/>
|
/>
|
||||||
</Route>
|
</Route>
|
||||||
<Route element={<PrivateSubscriptionOutlet />}>
|
<Route element={<PrivateSubscriptionOutlet />}>
|
||||||
<Route
|
<Route element={<Layout />}>
|
||||||
element={<Layout />}
|
|
||||||
>
|
|
||||||
<Route path={routes.client.home()} element={<HomePage />} />
|
<Route path={routes.client.home()} element={<HomePage />} />
|
||||||
<Route
|
<Route
|
||||||
path={routes.client.compatibility()}
|
path={routes.client.compatibility()}
|
||||||
@ -481,7 +478,10 @@ function App(): JSX.Element {
|
|||||||
|
|
||||||
{/* <Route path="*" element={<ABDesignV1Routes />} /> */}
|
{/* <Route path="*" element={<ABDesignV1Routes />} /> */}
|
||||||
|
|
||||||
<Route path="*" element={<Navigate to={getRouteBy(subscriptionStatus)} />} />
|
<Route
|
||||||
|
path="*"
|
||||||
|
element={<Navigate to={getRouteBy(subscriptionStatus)} />}
|
||||||
|
/>
|
||||||
|
|
||||||
{/* ROUTES OFF */}
|
{/* ROUTES OFF */}
|
||||||
|
|
||||||
@ -1055,13 +1055,13 @@ function Layout(): JSX.Element {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="container">
|
<div className="container">
|
||||||
{showHeader ? (
|
{showHeader ? <Header openMenu={() => setIsMenuOpen(true)} /> : null}
|
||||||
<Header
|
|
||||||
openMenu={() => setIsMenuOpen(true)}
|
|
||||||
/>
|
|
||||||
) : null}
|
|
||||||
{isRouteFullDataModal && (
|
{isRouteFullDataModal && (
|
||||||
<Modal open={isShowFullDataModal} isCloseButtonVisible={false} onClose={() => setIsShowFullDataModal(false)}>
|
<Modal
|
||||||
|
open={isShowFullDataModal}
|
||||||
|
isCloseButtonVisible={false}
|
||||||
|
onClose={() => setIsShowFullDataModal(false)}
|
||||||
|
>
|
||||||
<FullDataModal onClose={onCloseFullDataModal} />
|
<FullDataModal onClose={onCloseFullDataModal} />
|
||||||
</Modal>
|
</Modal>
|
||||||
)}
|
)}
|
||||||
@ -1284,13 +1284,14 @@ function MainPage(): JSX.Element {
|
|||||||
const status = useSelector(selectors.selectStatus);
|
const status = useSelector(selectors.selectStatus);
|
||||||
const route = getRouteBy(status);
|
const route = getRouteBy(status);
|
||||||
const [shouldRedirect, setShouldRedirect] = useState(false);
|
const [shouldRedirect, setShouldRedirect] = useState(false);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
// Check if we're navigating to auth and on witlab.app domain
|
// Check if we're navigating to auth and on witlab.app domain
|
||||||
if (route === routes.client.auth()) {
|
if (route === routes.client.auth()) {
|
||||||
const isWitlabDomain = window.location.hostname === 'witlab.app' ||
|
const isWitlabDomain =
|
||||||
window.location.hostname.endsWith('.witlab.app');
|
window.location.hostname === "witlab.app" ||
|
||||||
|
window.location.hostname.endsWith(".witlab.app");
|
||||||
|
|
||||||
// If we're on witlab.app domain, use server-side navigation
|
// If we're on witlab.app domain, use server-side navigation
|
||||||
if (isWitlabDomain) {
|
if (isWitlabDomain) {
|
||||||
navigateToAuth();
|
navigateToAuth();
|
||||||
@ -1298,12 +1299,12 @@ function MainPage(): JSX.Element {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, [route]);
|
}, [route]);
|
||||||
|
|
||||||
// If we're redirecting via server-side navigation, return empty fragment
|
// If we're redirecting via server-side navigation, return empty fragment
|
||||||
if (shouldRedirect) {
|
if (shouldRedirect) {
|
||||||
return <></>;
|
return <></>;
|
||||||
}
|
}
|
||||||
|
|
||||||
// For all other cases, use client-side navigation
|
// For all other cases, use client-side navigation
|
||||||
return <Navigate to={route} replace={true} />;
|
return <Navigate to={route} replace={true} />;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -86,7 +86,7 @@ function OutOfCreditsModal({
|
|||||||
fill: "#7ED8F8",
|
fill: "#7ED8F8",
|
||||||
fontSize: "30px",
|
fontSize: "30px",
|
||||||
fontWeight: "bold",
|
fontWeight: "bold",
|
||||||
dominantBaseline: "no-change",
|
dominantBaseline: "middle",
|
||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
maxValue={timerSeconds}
|
maxValue={timerSeconds}
|
||||||
|
|||||||
@ -2,12 +2,11 @@ import styles from "./styles.module.scss";
|
|||||||
import { useRef, useState } from "react";
|
import { useRef, useState } from "react";
|
||||||
import { Document, DocumentProps, Page } from "react-pdf";
|
import { Document, DocumentProps, Page } from "react-pdf";
|
||||||
import Loader, { LoaderColor } from "../Loader";
|
import Loader, { LoaderColor } from "../Loader";
|
||||||
import { File } from "node_modules/react-pdf/dist/esm/shared/types";
|
|
||||||
import { Pagination } from "@mui/material";
|
import { Pagination } from "@mui/material";
|
||||||
|
|
||||||
interface IPDFViewerProps {
|
interface IPDFViewerProps {
|
||||||
width?: number;
|
width?: number;
|
||||||
file?: File;
|
file?: DocumentProps["file"];
|
||||||
}
|
}
|
||||||
|
|
||||||
const pagesOfPaginationPageLength = 1;
|
const pagesOfPaginationPageLength = 1;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user