Deat Dockerfiles y Fix Base_URL
This commit is contained in:
@@ -2,7 +2,7 @@ import { useState, useEffect } from 'react';
|
||||
import toast from 'react-hot-toast';
|
||||
import styles from './SimpleTable.module.css';
|
||||
|
||||
const BASE_URL = 'http://localhost:5198/api';
|
||||
const BASE_URL = '/api';
|
||||
|
||||
// Interfaces para los diferentes tipos de datos
|
||||
interface TextValue {
|
||||
|
||||
@@ -4,7 +4,7 @@ import type { Sector } from '../types/interfaces';
|
||||
import styles from './SimpleTable.module.css';
|
||||
import ModalSector from './ModalSector';
|
||||
|
||||
const BASE_URL = 'http://localhost:5198/api';
|
||||
const BASE_URL = '/api';
|
||||
|
||||
const GestionSectores = () => {
|
||||
const [sectores, setSectores] = useState<Sector[]>([]);
|
||||
|
||||
@@ -10,7 +10,7 @@ interface ModalAnadirEquipoProps {
|
||||
onSave: (nuevoEquipo: Omit<Equipo, 'id' | 'created_at' | 'updated_at'>) => void;
|
||||
}
|
||||
|
||||
const BASE_URL = 'http://localhost:5198/api';
|
||||
const BASE_URL = '/api';
|
||||
|
||||
const ModalAnadirEquipo: React.FC<ModalAnadirEquipoProps> = ({ sectores, onClose, onSave }) => {
|
||||
const [nuevoEquipo, setNuevoEquipo] = useState({
|
||||
|
||||
@@ -7,7 +7,7 @@ interface Props {
|
||||
onSave: (usuario: { username: string }) => void;
|
||||
}
|
||||
|
||||
const BASE_URL = 'http://localhost:5198/api';
|
||||
const BASE_URL = '/api';
|
||||
|
||||
const ModalAnadirUsuario: React.FC<Props> = ({ onClose, onSave }) => {
|
||||
const [username, setUsername] = useState('');
|
||||
|
||||
@@ -19,7 +19,7 @@ interface ModalDetallesEquipoProps {
|
||||
onAddComponent: (type: 'disco' | 'ram' | 'usuario') => void;
|
||||
}
|
||||
|
||||
const BASE_URL = 'http://localhost:5198/api';
|
||||
const BASE_URL = '/api';
|
||||
|
||||
const ModalDetallesEquipo: React.FC<ModalDetallesEquipoProps> = ({
|
||||
equipo, isOnline, historial, sectores, onClose, onDelete, onRemoveAssociation, onEdit, onAddComponent
|
||||
|
||||
@@ -37,7 +37,7 @@ const SimpleTable = () => {
|
||||
const [isAddModalOpen, setIsAddModalOpen] = useState(false);
|
||||
const [addingComponent, setAddingComponent] = useState<'disco' | 'ram' | 'usuario' | null>(null);
|
||||
const [isLoading, setIsLoading] = useState(true);
|
||||
const BASE_URL = 'http://localhost:5198/api';
|
||||
const BASE_URL = '/api';
|
||||
|
||||
useEffect(() => {
|
||||
const scrollBarWidth = window.innerWidth - document.documentElement.clientWidth;
|
||||
|
||||
Reference in New Issue
Block a user