update version of packages
This commit is contained in:
gofnnp 2025-12-26 22:18:03 +04:00
parent 3197fb4ca2
commit cb56c45c2c
5 changed files with 2161 additions and 5720 deletions

7765
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -42,7 +42,7 @@
"react-ga4": "^2.1.0",
"react-helmet": "^6.1.0",
"react-i18next": "^12.3.1",
"react-pdf": "8.0.2",
"react-pdf": "^10.2.0",
"react-player": "^2.16.0",
"react-redux": "^8.0.5",
"react-router-dom": "^6.11.2",
@ -72,7 +72,7 @@
"postcss": "^8.5.6",
"terser": "^5.43.1",
"typescript": "^5.0.4",
"vite": "^4.3.8",
"vite": "^7.3.0",
"vite-plugin-svgr": "^4.2.0"
}
}

View File

@ -1,10 +1,4 @@
import {
useState,
useEffect,
useRef,
useMemo,
useLayoutEffect
} from "react";
import { useState, useEffect, useRef, useMemo, useLayoutEffect } from "react";
import {
Routes,
Route,
@ -150,7 +144,7 @@ import { useSession } from "@/hooks/session/useSession";
import { getSourceByPathname } from "@/utils/source.utils";
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 RetainingFunnelRoutes from "@/routerComponents/RetainingFunnel";
import { ELocalesPlacement } from "@/locales";
@ -184,16 +178,16 @@ function App(): JSX.Element {
unleashClient.updateContext({
userId: user?.id || undefined,
properties: {
source
}
source,
},
});
}
if (session?.[source]) {
unleashClient.updateContext({
sessionId: session?.[source] || undefined,
properties: {
source
}
source,
},
});
}
}, [user, session, source, unleashClient]);
@ -214,10 +208,14 @@ function App(): JSX.Element {
if (isPageAvailable) {
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
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));
}
}
@ -293,18 +291,12 @@ function App(): JSX.Element {
<CookieYesController isDelete={subscriptionStatus === "subscribed"} />
}
>
<Route
path={`${profilePrefix}/*`}
element={<ProfileRoutes />}
/>
<Route path={`${profilePrefix}/*`} element={<ProfileRoutes />} />
<Route
path={`${retainingFunnelPrefix}/*`}
element={<RetainingFunnelRoutes />}
/>
<Route
path={`${anonymousPrefix}/*`}
element={<AnonymousRoutes />}
/>
<Route path={`${anonymousPrefix}/*`} element={<AnonymousRoutes />} />
<Route
path={`${palmistryV1Prefix}/*`}
element={<PalmistryV1Routes />}
@ -321,7 +313,10 @@ function App(): JSX.Element {
path={`${compatibilityV4Prefix}/*`}
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
path={`${palmistryV2Prefix}/*`}
@ -339,9 +334,22 @@ function App(): JSX.Element {
<Route path={routes.client.skipTrial()} element={<SkipTrial />} />
<Route
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>
{/* Additional Purchases Main End */}
@ -377,14 +385,8 @@ function App(): JSX.Element {
element={<FreePeriodInfoPage />}
/>
<Route path={routes.client.feedback()} element={<FeedbackPage />} />
<Route
path={routes.client.birthtime()}
element={<BirthtimePage />}
/>
<Route
path={routes.client.createProfile()}
element={<SkipStep />}
/>
<Route path={routes.client.birthtime()} element={<BirthtimePage />} />
<Route path={routes.client.createProfile()} element={<SkipStep />} />
<Route
path={routes.client.emailEnter()}
element={<EmailEnterPage />}
@ -398,10 +400,7 @@ function App(): JSX.Element {
element={<AuthResultPage />}
/>
{/* <Route path={routes.client.static()} element={<StaticPage />} /> */}
<Route
path={routes.client.priceList()}
element={<PriceListPage />}
/>
<Route path={routes.client.priceList()} element={<PriceListPage />} />
</Route>
{/* <Route element={<AuthorizedUserOutlet />}>
<Route
@ -419,9 +418,7 @@ function App(): JSX.Element {
/>
</Route>
<Route element={<PrivateSubscriptionOutlet />}>
<Route
element={<Layout />}
>
<Route element={<Layout />}>
<Route path={routes.client.home()} element={<HomePage />} />
<Route
path={routes.client.compatibility()}
@ -481,7 +478,10 @@ function App(): JSX.Element {
{/* <Route path="*" element={<ABDesignV1Routes />} /> */}
<Route path="*" element={<Navigate to={getRouteBy(subscriptionStatus)} />} />
<Route
path="*"
element={<Navigate to={getRouteBy(subscriptionStatus)} />}
/>
{/* ROUTES OFF */}
@ -1055,13 +1055,13 @@ function Layout(): JSX.Element {
return (
<div className="container">
{showHeader ? (
<Header
openMenu={() => setIsMenuOpen(true)}
/>
) : null}
{showHeader ? <Header openMenu={() => setIsMenuOpen(true)} /> : null}
{isRouteFullDataModal && (
<Modal open={isShowFullDataModal} isCloseButtonVisible={false} onClose={() => setIsShowFullDataModal(false)}>
<Modal
open={isShowFullDataModal}
isCloseButtonVisible={false}
onClose={() => setIsShowFullDataModal(false)}
>
<FullDataModal onClose={onCloseFullDataModal} />
</Modal>
)}
@ -1284,13 +1284,14 @@ function MainPage(): JSX.Element {
const status = useSelector(selectors.selectStatus);
const route = getRouteBy(status);
const [shouldRedirect, setShouldRedirect] = useState(false);
useEffect(() => {
// Check if we're navigating to auth and on witlab.app domain
if (route === routes.client.auth()) {
const isWitlabDomain = window.location.hostname === 'witlab.app' ||
window.location.hostname.endsWith('.witlab.app');
const isWitlabDomain =
window.location.hostname === "witlab.app" ||
window.location.hostname.endsWith(".witlab.app");
// If we're on witlab.app domain, use server-side navigation
if (isWitlabDomain) {
navigateToAuth();
@ -1298,12 +1299,12 @@ function MainPage(): JSX.Element {
}
}
}, [route]);
// If we're redirecting via server-side navigation, return empty fragment
if (shouldRedirect) {
return <></>;
}
// For all other cases, use client-side navigation
return <Navigate to={route} replace={true} />;
}

View File

@ -86,7 +86,7 @@ function OutOfCreditsModal({
fill: "#7ED8F8",
fontSize: "30px",
fontWeight: "bold",
dominantBaseline: "no-change",
dominantBaseline: "middle",
},
}}
maxValue={timerSeconds}

View File

@ -2,12 +2,11 @@ import styles from "./styles.module.scss";
import { useRef, useState } from "react";
import { Document, DocumentProps, Page } from "react-pdf";
import Loader, { LoaderColor } from "../Loader";
import { File } from "node_modules/react-pdf/dist/esm/shared/types";
import { Pagination } from "@mui/material";
interface IPDFViewerProps {
width?: number;
file?: File;
file?: DocumentProps["file"];
}
const pagesOfPaginationPageLength = 1;