Skip to content

Commit f0ef652

Browse files
Change .js files into .jsx files
1 parent 82aa220 commit f0ef652

31 files changed

+81
-72
lines changed

src/App.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import React, { useState, useEffect } from "react";
22
import { BrowserRouter as Router, Route, Routes, Navigate } from "react-router-dom";
33
import Home from './pages/Home/Home.js';
4-
import LoginPage from './pages/Login/LoginPage.js';
5-
import AdministratorHome from './pages/Administrator/AdministratorHome.js'; // Importa el componente
4+
import LoginPage from './pages/Login/LoginPage.jsx';
5+
import AdministratorHome from './pages/Administrator/AdministratorHome.jsx'; // Importa el componente
66

77
import './App.css';
88

src/components/Admin/FilterSection.js renamed to src/components/Admin/FilterSection.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,4 +210,4 @@ const SearchButton = styled.button`
210210
cursor: pointer;
211211
`;
212212

213-
export default FilterSection;
213+
export default FilterSection;

src/components/Admin/Header.js renamed to src/components/Admin/Header.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,4 +111,4 @@ const SubHeading = styled.p`
111111
padding: 0 210px;
112112
letter-spacing: -0.28px;
113113
margin-top: 20px;
114-
`;
114+
`;

src/components/Admin/Sidebar.js renamed to src/components/Admin/Sidebar.jsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,5 +68,4 @@ const NavText = styled.span`
6868
flex-shrink: 1;
6969
width: 127px;
7070
font-weight: bold; /* Texto en negrilla */
71-
`;
72-
71+
`;

src/components/Admin/charts/DemandaChart.js renamed to src/components/Admin/charts/DemandaChart.jsx

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// src/components/Admin/charts/DemandaChart.js
21
import React, { useEffect, useRef } from "react";
32
import * as d3 from "d3";
43

@@ -29,50 +28,51 @@ const DemandaChart = ({ reservas }) => {
2928
}));
3029

3130
// Usamos d3.hierarchy para crear una estructura para el pack layout.
32-
const root = d3.hierarchy({ children: data })
33-
.sum(d => d.count);
31+
const root = d3.hierarchy({ children: data }).sum((d) => d.count);
3432

3533
// Configurar el pack layout
36-
const pack = d3.pack()
37-
.size([width, height])
38-
.padding(10);
34+
const pack = d3.pack().size([width, height]).padding(10);
3935

4036
const nodes = pack(root).leaves();
4137

4238
// Escala de colores
4339
const color = d3.scaleOrdinal(d3.schemeSet3);
4440

4541
// Dibujar las burbujas
46-
const node = svg.selectAll("g")
42+
const node = svg
43+
.selectAll("g")
4744
.data(nodes)
4845
.enter()
4946
.append("g")
50-
.attr("transform", d => `translate(${d.x}, ${d.y})`);
47+
.attr("transform", (d) => `translate(${d.x}, ${d.y})`);
5148

52-
node.append("circle")
49+
node
50+
.append("circle")
5351
.attr("r", 0)
5452
.attr("fill", (d, i) => color(i))
5553
.transition()
5654
.duration(800)
57-
.attr("r", d => d.r);
55+
.attr("r", (d) => d.r);
5856

5957
// Agregar etiquetas dentro de cada burbuja (nombre del salón y cantidad)
60-
node.append("text")
58+
node
59+
.append("text")
6160
.attr("text-anchor", "middle")
6261
.attr("dy", "-0.3em")
63-
.attr("font-size", d => Math.min(2 * d.r / d.data.salon.length, 18))
62+
.attr("font-size", (d) => Math.min((2 * d.r) / d.data.salon.length, 18))
6463
.attr("fill", "#000")
65-
.text(d => d.data.salon);
64+
.text((d) => d.data.salon);
6665

67-
node.append("text")
66+
node
67+
.append("text")
6868
.attr("text-anchor", "middle")
6969
.attr("dy", "1em")
7070
.attr("font-size", "12px")
7171
.attr("fill", "#000")
72-
.text(d => d.data.count);
72+
.text((d) => d.data.count);
7373
}, [reservas]);
7474

7575
return <svg ref={chartRef}></svg>;
7676
};
7777

78-
export default DemandaChart;
78+
export default DemandaChart;

src/components/Admin/charts/DiaSalonChart.js renamed to src/components/Admin/charts/DiaSalonChart.jsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// src/components/Admin/charts/DiaSalonChart.js
21
import React, { useEffect, useRef } from "react";
32
import * as d3 from "d3";
43

@@ -66,4 +65,4 @@ const DiaSalonChart = ({ reservas }) => {
6665
return <svg ref={chartRef}></svg>;
6766
};
6867

69-
export default DiaSalonChart;
68+
export default DiaSalonChart;

src/components/Admin/charts/EstadoChart.js renamed to src/components/Admin/charts/EstadoChart.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// src/components/Admin/charts/EstadoChart.js
1+
// src/components/Admin/charts/EstadoChart.jsx
22
import React, { useEffect, useRef } from "react";
33
import * as d3 from "d3";
44

@@ -77,4 +77,4 @@ const EstadoChart = ({ reservas }) => {
7777
return <svg ref={chartRef}></svg>;
7878
};
7979

80-
export default EstadoChart;
80+
export default EstadoChart;

src/components/Admin/charts/MesSalonChart.js renamed to src/components/Admin/charts/MesSalonChart.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// src/components/Admin/charts/MesSalonChart.js
1+
// src/components/Admin/charts/MesSalonChart.jsx
22
import React, { useEffect, useRef } from "react";
33
import * as d3 from "d3";
44

@@ -70,4 +70,4 @@ const MesSalonChart = ({ reservas }) => {
7070
return <svg ref={chartRef}></svg>;
7171
};
7272

73-
export default MesSalonChart;
73+
export default MesSalonChart;

src/components/Admin/charts/PromedioPrioridadChart.js renamed to src/components/Admin/charts/PromedioPrioridadChart.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// src/components/Admin/charts/PromedioPrioridadChart.js
1+
// src/components/Admin/charts/PromedioPrioridadChart.jsx
22
import React, { useEffect, useRef } from "react";
33
import * as d3 from "d3";
44

@@ -84,4 +84,4 @@ const PromedioPrioridadChart = ({ data }) => {
8484
return <svg ref={chartRef}></svg>;
8585
};
8686

87-
export default PromedioPrioridadChart;
87+
export default PromedioPrioridadChart;

src/components/Admin/charts/RangoFechasChart.js renamed to src/components/Admin/charts/RangoFechasChart.jsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// src/components/Admin/charts/RangoFechasChart.js
21
import React, { useEffect, useRef } from "react";
32
import * as d3 from "d3";
43

@@ -80,4 +79,4 @@ const RangoFechasChart = ({ reservas }) => {
8079
return <svg ref={chartRef}></svg>;
8180
};
8281

83-
export default RangoFechasChart;
82+
export default RangoFechasChart;

0 commit comments

Comments
 (0)