Skip to content

Commit

Permalink
fix eslint 2
Browse files Browse the repository at this point in the history
  • Loading branch information
FelipeEspinozaS committed Oct 29, 2024
1 parent c423252 commit 2e38c01
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 24 deletions.
23 changes: 2 additions & 21 deletions src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ import {
fetchUser,
fetchFixtures,
signUpUser,
addMoneyToWallet as addMoneyService,
viewMyBonuses as viewMyBonusesService,
addMoneyToWallet as addMoneyService
} from './services/apiService.jsx';

function App() {
Expand All @@ -18,7 +17,7 @@ function App() {
const [currentPage, setCurrentPage] = useState(1);
const [filters, setFilters] = useState({ home: '', away: '', date: '' });
const [walletBalance, setWalletBalance] = useState(0);
const [bonuses, setBonuses] = useState([]);
const [bonuses] = useState([]);
const [showModal, setShowModal] = useState(false);
const [showBuyModal, setShowBuyModal] = useState(false);
const [showProcessingModal, setShowProcessingModal] = useState(false);
Expand Down Expand Up @@ -203,24 +202,6 @@ function App() {
}
};

// Función para ver mis bonos
// const handleViewBonuses = async () => {
// const userId = localStorage.getItem('userId');

// if (!userId) {
// alert('No se pudo encontrar el ID del usuario.');
// return;
// }

// try {
// const fetchedBonuses = await viewMyBonusesService(userId, getAccessTokenSilently);
// setBonuses(fetchedBonuses);
// setShowModal(true);
// } catch (error) {
// alert('Error al obtener los bonuses.');
// }
// };

const handleLogout = () => {
// Eliminar userId del localStorage
localStorage.removeItem('userId');
Expand Down
7 changes: 4 additions & 3 deletions src/components/PurchaseCompleted.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,16 @@ import './PurchaseCompleted.css'; // Puedes crear un CSS específico para esta p
import { useLocation, useNavigate } from 'react-router-dom';
import axios from 'axios';
import { generateInvoice } from '../services/invoiceService';
import { useAuth0 } from '@auth0/auth0-react';

const PurchaseCompleted = () => {
const [statusMessage, setStatusMessage] = useState('Validando tu compra...');
const [isSuccess, setIsSuccess] = useState(null);
const [isAborted, setIsAborted] = useState(false);
const [setIsLoading] = useState(true);
const [isLoading, setIsLoading] = useState(true);
const hasConfirmed = useRef(false);

const location = useLocation();
const navigate = useNavigate();
// const { user } = useAuth0(); // Obtén la información del usuario autenticado

useEffect(() => {
const confirmTransaction = async () => {
Expand All @@ -39,6 +37,9 @@ const PurchaseCompleted = () => {
try {
const apiUrl = process.env.REACT_APP_API_URL;

if (isLoading) {
console.log('');
}
// get request_id from local storage
const request_id = localStorage.getItem('request_id');
localStorage.removeItem('request_id');
Expand Down

0 comments on commit 2e38c01

Please sign in to comment.