6.17.4: Фикс закрытия экрана закупки через history.back
Some checks failed
Build and Push Docker Image / build-and-push (push) Failing after 1m14s
Some checks failed
Build and Push Docker Image / build-and-push (push) Failing after 1m14s
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "play-life-web",
|
"name": "play-life-web",
|
||||||
"version": "6.17.3",
|
"version": "6.17.4",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ function PurchaseScreen({ onNavigate, purchaseConfigId, taskId, taskName }) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const handleClose = () => {
|
const handleClose = () => {
|
||||||
onNavigate?.('tasks')
|
window.history.back()
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleCompleteTask = async () => {
|
const handleCompleteTask = async () => {
|
||||||
@@ -110,7 +110,7 @@ function PurchaseScreen({ onNavigate, purchaseConfigId, taskId, taskName }) {
|
|||||||
body: JSON.stringify({})
|
body: JSON.stringify({})
|
||||||
})
|
})
|
||||||
if (response.ok) {
|
if (response.ok) {
|
||||||
setTimeout(() => onNavigate?.('tasks'), 500)
|
setTimeout(() => window.history.back(), 500)
|
||||||
return
|
return
|
||||||
} else {
|
} else {
|
||||||
const errorData = await response.json().catch(() => ({}))
|
const errorData = await response.json().catch(() => ({}))
|
||||||
|
|||||||
Reference in New Issue
Block a user