This commit is contained in:
Vassshhh
2025-08-06 12:24:59 +07:00
parent 8c0b9568e8
commit 59ab35c332
3 changed files with 35 additions and 16 deletions

View File

@@ -1,7 +1,7 @@
import React, { useState } from 'react';
import styles from './ProductDetail.module.css';
const ProductDetail = ({ subscriptions, product, setPostLoginAction, setShowedModal }) => {
const ProductDetail = ({ subscriptions, product, requestLogin, setShowedModal }) => {
const [showChildSelector, setShowChildSelector] = useState(false);
const [selectedChildIds, setSelectedChildIds] = useState([]);
@@ -33,8 +33,7 @@ const ProductDetail = ({ subscriptions, product, setPostLoginAction, setShowedMo
const token = tokenCookie ? tokenCookie.split('=')[1] : '';
if (!token) {
setPostLoginAction(() => () => setShowedModal('product'));
setShowedModal('login');
requestLogin('checkout');
return;
}
if (product.type == 'product') {