Se soluciono un problema de bucle
This commit is contained in:
@@ -4,7 +4,7 @@ import GustavoBazPrada from "@/components/administrador/gustavo-baz-prada";
|
||||
import Reporte from "@/components/administrador/reporte";
|
||||
import BotonRegresar from "@/components/boton-regresar";
|
||||
import { type } from "node:os";
|
||||
import { useEffect, useState } from "react";
|
||||
import { useEffect, useState, useMemo } from "react";
|
||||
|
||||
export default function Registro() {
|
||||
//const years = [2020, 2021, 2022, 2023, 2024, 2025];
|
||||
@@ -20,7 +20,7 @@ export default function Registro() {
|
||||
return years1
|
||||
}
|
||||
|
||||
const years = obtenerYears()
|
||||
const years = useMemo(() => obtenerYears(), [])
|
||||
|
||||
useEffect(() => {
|
||||
setAdmin({ token: localStorage.getItem("token") || "" });
|
||||
|
||||
Reference in New Issue
Block a user