Merge branch 'dev' into 'staging'
переход на оплату с квиза только при работе компонента, а не его подгрузке See merge request frontend/marketplace!111
This commit is contained in:
commit
72599a0270
@ -71,6 +71,7 @@ const App = () => {
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
console.log(location)
|
||||||
if (location.state?.redirectTo)
|
if (location.state?.redirectTo)
|
||||||
return <Navigate to={location.state.redirectTo} replace state={{ backgroundLocation: location }} />
|
return <Navigate to={location.state.redirectTo} replace state={{ backgroundLocation: location }} />
|
||||||
|
|
||||||
@ -83,7 +84,6 @@ const App = () => {
|
|||||||
<Route path="/recover" element={<RecoverDialog />} />
|
<Route path="/recover" element={<RecoverDialog />} />
|
||||||
<Route path="/changepwd" element={<RecoverPassword />} />
|
<Route path="/changepwd" element={<RecoverPassword />} />
|
||||||
<Route path="/changepwd/expired" element={<OutdatedLink />} />
|
<Route path="/changepwd/expired" element={<OutdatedLink />} />
|
||||||
|
|
||||||
</Routes>
|
</Routes>
|
||||||
)}
|
)}
|
||||||
<Routes location={location.state?.backgroundLocation || location}>
|
<Routes location={location.state?.backgroundLocation || location}>
|
||||||
@ -93,7 +93,7 @@ const App = () => {
|
|||||||
<Route path="/recover" element={<Navigate to="/" replace state={{ redirectTo: "/recover" }} />} />
|
<Route path="/recover" element={<Navigate to="/" replace state={{ redirectTo: "/recover" }} />} />
|
||||||
<Route path="/changepwd" element={<Navigate to="/" replace state={{ redirectTo: window.location.pathname + window.location.search }} />} />
|
<Route path="/changepwd" element={<Navigate to="/" replace state={{ redirectTo: window.location.pathname + window.location.search }} />} />
|
||||||
<Route path="/changepwd/expired" element={<Navigate to="/" replace state={{ redirectTo: "/changepwd/expired" }} />} />
|
<Route path="/changepwd/expired" element={<Navigate to="/" replace state={{ redirectTo: "/changepwd/expired" }} />} />
|
||||||
<Route path="/quizpayment" element={<QuizPayment/>} />
|
|
||||||
<Route element={<PrivateRoute />}>
|
<Route element={<PrivateRoute />}>
|
||||||
<Route element={<ProtectedLayout />}>
|
<Route element={<ProtectedLayout />}>
|
||||||
<Route path="/tariffs" element={<Tariffs />} />
|
<Route path="/tariffs" element={<Tariffs />} />
|
||||||
@ -112,6 +112,7 @@ const App = () => {
|
|||||||
</Route>
|
</Route>
|
||||||
</Route>
|
</Route>
|
||||||
<Route path="/ppdd" element={<PPofData/>}/>
|
<Route path="/ppdd" element={<PPofData/>}/>
|
||||||
|
<Route path="/quizpayment" element={<QuizPayment/>} />
|
||||||
<Route element={<Docs />}>
|
<Route element={<Docs />}>
|
||||||
<Route path={"/docs/oferta"} element={<Oferta />}/>
|
<Route path={"/docs/oferta"} element={<Oferta />}/>
|
||||||
<Route path={"/docs/privacy"} element={<PrivacyPolicy />}/>
|
<Route path={"/docs/privacy"} element={<PrivacyPolicy />}/>
|
||||||
|
@ -22,7 +22,6 @@ 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")
|
||||||
|
|
||||||
history.pushState(null, document.title, "/quizpayment");
|
|
||||||
|
|
||||||
let first = true
|
let first = true
|
||||||
|
|
||||||
@ -33,6 +32,7 @@ export default function QuizPayment() {
|
|||||||
console.log("Я начал работать")
|
console.log("Я начал работать")
|
||||||
|
|
||||||
if (first) {
|
if (first) {
|
||||||
|
history.pushState(null, document.title, "/quizpayment");
|
||||||
try {
|
try {
|
||||||
first = false
|
first = false
|
||||||
if (action && dif && token) {
|
if (action && dif && token) {
|
||||||
|
Loading…
Reference in New Issue
Block a user