Merge branch 'staging' of gitea.pena:PenaSide/front-hub into staging
Some checks failed
Deploy / DeployService (push) Has been cancelled
Deploy / CreateImage (push) Has been cancelled

This commit is contained in:
Nastya 2025-06-09 23:31:08 +03:00
commit c486780fea
2 changed files with 8 additions and 4 deletions

@ -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/*
WORKDIR /usr/app

@ -26,6 +26,7 @@ const action = params.get("action");
const dif = params.get("dif");
const token = params.get("data");
const userId = params.get("userid");
const wayback = params.get("wayback");
let first = true;
@ -36,10 +37,13 @@ export default function QuizPayment() {
useEffect(
function redirectIfSignedIn() {
if (!first && user?._id === userId)
navigate(`/payment?action=${action}&dif=${dif}&user=${userId}`, {
if (!first && user?._id === userId) {
let returnUrl = `/payment?action=${action}&dif=${dif}&user=${userId}`
if (wayback) returnUrl += `&wayback=${wayback}`
navigate(returnUrl, {
replace: true,
});
}
},
[navigate, user]
);