Spaces:
Running on CPU Upgrade
Running on CPU Upgrade
Update frontend/src/components/PricingSection.jsx
Browse files
frontend/src/components/PricingSection.jsx
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
|
|
| 1 |
import React, { useState, useEffect } from 'react';
|
| 2 |
import { useAuth } from '../components/AuthContext';
|
| 3 |
import { useNavigate } from 'react-router-dom';
|
| 4 |
import {
|
| 5 |
Shield,
|
| 6 |
Zap,
|
| 7 |
-
Server,
|
| 8 |
Check,
|
| 9 |
Target,
|
| 10 |
ArrowRight,
|
|
@@ -15,7 +15,6 @@ export default function PricingSection({ embedded = false, hideCurrentPlan = fal
|
|
| 15 |
const { user, token, refreshAccessToken } = useAuth();
|
| 16 |
const navigate = useNavigate();
|
| 17 |
const [loadingPlan, setLoadingPlan] = useState(null);
|
| 18 |
-
const [billingCycle, setBillingCycle] = useState('monthly');
|
| 19 |
const [paymentSuccess, setPaymentSuccess] = useState(false);
|
| 20 |
const [paymentError, setPaymentError] = useState(null);
|
| 21 |
const [dynamicPrices, setDynamicPrices] = useState({});
|
|
@@ -105,7 +104,7 @@ export default function PricingSection({ embedded = false, hideCurrentPlan = fal
|
|
| 105 |
'Content-Type': 'application/json',
|
| 106 |
'Authorization': `Bearer ${token}`
|
| 107 |
},
|
| 108 |
-
body: JSON.stringify({ price_id: priceId, billing_cycle:
|
| 109 |
});
|
| 110 |
|
| 111 |
const orderData = await res.json();
|
|
|
|
| 1 |
+
/* eslint-disable react-hooks/exhaustive-deps, react-hooks/set-state-in-effect, react-hooks/immutability */
|
| 2 |
import React, { useState, useEffect } from 'react';
|
| 3 |
import { useAuth } from '../components/AuthContext';
|
| 4 |
import { useNavigate } from 'react-router-dom';
|
| 5 |
import {
|
| 6 |
Shield,
|
| 7 |
Zap,
|
|
|
|
| 8 |
Check,
|
| 9 |
Target,
|
| 10 |
ArrowRight,
|
|
|
|
| 15 |
const { user, token, refreshAccessToken } = useAuth();
|
| 16 |
const navigate = useNavigate();
|
| 17 |
const [loadingPlan, setLoadingPlan] = useState(null);
|
|
|
|
| 18 |
const [paymentSuccess, setPaymentSuccess] = useState(false);
|
| 19 |
const [paymentError, setPaymentError] = useState(null);
|
| 20 |
const [dynamicPrices, setDynamicPrices] = useState({});
|
|
|
|
| 104 |
'Content-Type': 'application/json',
|
| 105 |
'Authorization': `Bearer ${token}`
|
| 106 |
},
|
| 107 |
+
body: JSON.stringify({ price_id: priceId, billing_cycle: 'monthly' })
|
| 108 |
});
|
| 109 |
|
| 110 |
const orderData = await res.json();
|