Merge branch 'remove-commit' into 'main'

fix: remove commit

See merge request witapp/aura-webapp!21
This commit is contained in:
Victor Ershov 2023-12-31 01:00:19 +00:00
commit 2c68672ff7
3 changed files with 87 additions and 81 deletions

View File

@ -233,7 +233,7 @@ function App(): JSX.Element {
<Route path=":subPlan" element={<SubscriptionPage />} />
</Route>
</Route>
{/* <Route element={<PrivateOutlet />}> */}
<Route element={<PrivateOutlet />}>
<Route element={<AuthorizedUserOutlet />}>
{/* <Route
path={routes.client.subscription()}
@ -248,7 +248,7 @@ function App(): JSX.Element {
element={<StripePage />}
/>
</Route>
{/* <Route element={<PrivateSubscriptionOutlet />}> */}
<Route element={<PrivateSubscriptionOutlet />}>
<Route path={routes.client.home()} element={<HomePage />} />
<Route
path={routes.client.compatibility()}
@ -266,8 +266,14 @@ function App(): JSX.Element {
path={routes.client.breathResult()}
element={<UserCallbacksPage />}
/>
<Route path={routes.client.wallpaper()} element={<WallpaperPage />} />
<Route path={routes.client.magicBall()} element={<MagicBallPage />} />
<Route
path={routes.client.wallpaper()}
element={<WallpaperPage />}
/>
<Route
path={routes.client.magicBall()}
element={<MagicBallPage />}
/>
<Route
path={routes.client.horoscopeBestiesResult()}
element={<BestiesHoroscopeResult />}
@ -296,8 +302,8 @@ function App(): JSX.Element {
path={routes.client.nameHoroscopeResult()}
element={<NameHoroscopeResult />}
/>
{/* </Route> */}
{/* </Route> */}
</Route>
</Route>
<Route path="*" element={<NotFoundPage />} />
</Route>
</Routes>
@ -431,25 +437,25 @@ function AuthorizedUserOutlet(): JSX.Element {
);
}
// function PrivateOutlet(): JSX.Element {
// const { user } = useAuth();
// return user ? (
// <Outlet />
// ) : (
// <Navigate to={routes.client.root()} replace={true} />
// );
// }
function PrivateOutlet(): JSX.Element {
const { user } = useAuth();
return user ? (
<Outlet />
) : (
<Navigate to={routes.client.root()} replace={true} />
);
}
// function PrivateSubscriptionOutlet(): JSX.Element {
// // const isProduction = import.meta.env.MODE === "production";
// const isProduction = false;
// const status = useSelector(selectors.selectStatus);
// return status === "subscribed" || !isProduction ? (
// <Outlet />
// ) : (
// <Navigate to={getRouteBy(status)} replace={true} />
// );
// }
function PrivateSubscriptionOutlet(): JSX.Element {
// const isProduction = import.meta.env.MODE === "production";
const isProduction = false;
const status = useSelector(selectors.selectStatus);
return status === "subscribed" || !isProduction ? (
<Outlet />
) : (
<Navigate to={getRouteBy(status)} replace={true} />
);
}
function getIsShowFullDataModal(dataItems: Array<unknown> = []): boolean {
let hasNoDataItem = false;

View File

@ -17,7 +17,7 @@ function AttentionPage({
}: AttentionPageProps): JSX.Element {
const { t } = useTranslation();
const navigate = useNavigate();
const handleNext = () => navigate(routes.client.home());
const handleNext = () => navigate(routes.client.priceList());
return (
<section className={`${styles.page} page`}>

View File

@ -2,7 +2,7 @@ import { createSlice, createSelector } from '@reduxjs/toolkit'
import type { PayloadAction } from '@reduxjs/toolkit'
import type { AuthToken } from '../api'
const initialState: AuthToken = 'eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOjI5MjY0LCJpYXQiOjE3MDA3ODcwNjcsImV4cCI6MTcwOTQyNzA2NywianRpIjoiNDJlYzI4M2ItY2M1My00ZGY1LWIxYzctZmFhZjM3OTU2NjY2IiwiZW1haWwiOiJmYmljaGExMjM0QGdtYWlsLmNvbSIsInN0YXRlIjoicHJvdmVuIiwibG9jIjoicnUiLCJ0eiI6MTQ0MDAsInR5cGUiOiJvYXV0aCIsImlzcyI6ImF1cmF3ZWIifQ.kPAN5MImnR1lhaotPPQc78faot2W1ceygEq33qLkfOM'
const initialState: AuthToken = ''
const authTokenSlice = createSlice({
name: 'token',