diff --git a/Containerfile b/Containerfile index 1ac8d4a..27cf567 100644 --- a/Containerfile +++ b/Containerfile @@ -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 diff --git a/src/pages/QuizPayment/QuizPayment.tsx b/src/pages/QuizPayment/QuizPayment.tsx index db853eb..3bba7f4 100644 --- a/src/pages/QuizPayment/QuizPayment.tsx +++ b/src/pages/QuizPayment/QuizPayment.tsx @@ -19,13 +19,14 @@ import { import { logout } from "@root/api/auth"; import { clearCustomTariffs } from "@root/stores/customTariffs"; import { clearTickets } from "@root/stores/tickets"; -import {setNotEnoughMoneyAmount} from "@stores/cart" +import { setNotEnoughMoneyAmount } from "@stores/cart" const params = new URLSearchParams(window.location.search); 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] );