Merge branch 'staging' of gitea.pena:PenaSide/front-hub into staging
This commit is contained in:
commit
c486780fea
@ -1,4 +1,4 @@
|
|||||||
FROM gitea.pena/penadevops/container-images/node:v20.14.0 as build
|
FROM gitea.pena/penadevops/container-images/node:main as build
|
||||||
|
|
||||||
RUN apk update && rm -rf /var/cache/apk/*
|
RUN apk update && rm -rf /var/cache/apk/*
|
||||||
WORKDIR /usr/app
|
WORKDIR /usr/app
|
||||||
|
@ -19,13 +19,14 @@ import {
|
|||||||
import { logout } from "@root/api/auth";
|
import { logout } from "@root/api/auth";
|
||||||
import { clearCustomTariffs } from "@root/stores/customTariffs";
|
import { clearCustomTariffs } from "@root/stores/customTariffs";
|
||||||
import { clearTickets } from "@root/stores/tickets";
|
import { clearTickets } from "@root/stores/tickets";
|
||||||
import {setNotEnoughMoneyAmount} from "@stores/cart"
|
import { setNotEnoughMoneyAmount } from "@stores/cart"
|
||||||
|
|
||||||
const params = new URLSearchParams(window.location.search);
|
const params = new URLSearchParams(window.location.search);
|
||||||
const action = params.get("action");
|
const action = params.get("action");
|
||||||
const dif = params.get("dif");
|
const dif = params.get("dif");
|
||||||
const token = params.get("data");
|
const token = params.get("data");
|
||||||
const userId = params.get("userid");
|
const userId = params.get("userid");
|
||||||
|
const wayback = params.get("wayback");
|
||||||
|
|
||||||
let first = true;
|
let first = true;
|
||||||
|
|
||||||
@ -36,10 +37,13 @@ export default function QuizPayment() {
|
|||||||
|
|
||||||
useEffect(
|
useEffect(
|
||||||
function redirectIfSignedIn() {
|
function redirectIfSignedIn() {
|
||||||
if (!first && user?._id === userId)
|
if (!first && user?._id === userId) {
|
||||||
navigate(`/payment?action=${action}&dif=${dif}&user=${userId}`, {
|
let returnUrl = `/payment?action=${action}&dif=${dif}&user=${userId}`
|
||||||
|
if (wayback) returnUrl += `&wayback=${wayback}`
|
||||||
|
navigate(returnUrl, {
|
||||||
replace: true,
|
replace: true,
|
||||||
});
|
});
|
||||||
|
}
|
||||||
},
|
},
|
||||||
[navigate, user]
|
[navigate, user]
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user