first commit

This commit is contained in:
2026-07-16 20:48:43 -03:00
commit 5696cee264
1111 changed files with 322270 additions and 0 deletions
@@ -0,0 +1,25 @@
"use client";
import { useState, useEffect } from "react";
function useContainerHeight(): string {
const [containerHeight, setContainerHeight] = useState("100vh");
useEffect(() => {
const calculateHeight = () => {
const footer = document.getElementById("tx.home.footer.container");
return footer ? `calc(100vh - ${footer.clientHeight}px - 138px)` : "100vh";
};
setContainerHeight(calculateHeight());
// Escuchar cambios de tamaño en la ventana por si el footer cambia
const handleResize = () => setContainerHeight(calculateHeight());
window.addEventListener("resize", handleResize);
return () => window.removeEventListener("resize", handleResize);
}, []);
return containerHeight;
}
export default useContainerHeight;
+27
View File
@@ -0,0 +1,27 @@
"use client";
import { useEffect, useState } from "react";
const useWindowSize = () => {
const [size, setSize] = useState<[number, number]>([0, 0]);
useEffect(() => {
if (typeof window === "undefined") return;
const updateSize = () => {
setSize([window.innerWidth, window.innerHeight]);
};
window.addEventListener("resize", updateSize);
window.addEventListener("load", updateSize);
updateSize();
return () => {
window.removeEventListener("load", updateSize);
window.removeEventListener("resize", updateSize);
};
}, []);
return size;
};
export default useWindowSize;
+14
View File
@@ -0,0 +1,14 @@
import { useFilterStore } from "@core/Store/Filter.Store";
import { useRouter } from "next/navigation";
export const useNavigation = () => {
const filter = useFilterStore();
const router = useRouter();
const goTo = (path: string) => {
router.push(path);
filter.clear();
};
return { goTo };
};