refactor: reorganizar modulos dentro de app

Coloca las secciones, datos, componentes, servicios y tipos dentro de sus dominios de app y normaliza los imports con el alias @.

Co-authored-by: Copilot <[email protected]>
This commit is contained in:
Emmanuel RojasandCopilot committed 2026-10-02 15:47:34 -05:00
1 parent efba699905
commit 794a659369
72 files changed
+171 -171

No files matched your search

+2 -2
View File
@@ -2,8 +2,8 @@
import Link from 'next/link'; import Link from 'next/link';
import { useState, useEffect } from 'react'; import { useState, useEffect } from 'react';
import { motion } from 'framer-motion'; import { motion } from 'framer-motion';
import Loader from '../../components/Loader'; import Loader from '@/app/components/Loader';
import { useBlogPosts } from '../../services/blog'; import { useBlogPosts } from '@/app/blog/services/blog';
const fadeUp = { const fadeUp = {
hidden: { opacity: 0, y: 28 }, hidden: { opacity: 0, y: 28 },
+3 -3
View File
@@ -3,9 +3,9 @@ import { useEffect } from 'react';
import { useParams, useRouter } from 'next/navigation'; import { useParams, useRouter } from 'next/navigation';
import Link from 'next/link'; import Link from 'next/link';
import { motion } from 'framer-motion'; import { motion } from 'framer-motion';
import { useBlogPost } from '../../../services/blog'; import { useBlogPost } from '@/app/blog/services/blog';
import { assetUrl } from '../../../services/api'; import { assetUrl } from '@/app/services/api';
import Loader from '../../../components/Loader'; import Loader from '@/app/components/Loader';
function renderContent(content: string) { function renderContent(content: string) {
return content.split('\n').map((line, i) => { return content.split('\n').map((line, i) => {
+2 -2
View File
@@ -1,8 +1,8 @@
import type { Metadata } from 'next'; import type { Metadata } from 'next';
import { notFound } from 'next/navigation'; import { notFound } from 'next/navigation';
import ArticlePage from './ArticlePage'; import ArticlePage from './ArticlePage';
import { API_URL, assetUrl } from '../../../services/api'; import { API_URL, assetUrl } from '@/app/services/api';
import type { BlogPost } from '../../../services/blog'; import type { BlogPost } from '@/app/blog/types/blog';
const BASE_URL = 'https://rynext.com.mx'; const BASE_URL = 'https://rynext.com.mx';
+1 -1
View File
@@ -1,4 +1,4 @@
import Loader from '../../components/Loader'; import Loader from '@/app/components/Loader';
export default function Loading() { export default function Loading() {
return ( return (
@@ -1,18 +1,6 @@
import { useQuery } from '@tanstack/react-query'; import { useQuery } from '@tanstack/react-query';
import { apiFetch } from './api'; import { apiFetch } from '@/app/services/api';
import type { BlogPost } from '@/app/blog/types/blog';
export interface BlogPost {
id: string;
title: string;
slug: string;
summary: string;
content: string;
category: string;
imageUrl?: string;
authorName?: string;
isPublished: boolean;
publishedAt?: string;
}
export function useBlogPosts() { export function useBlogPosts() {
return useQuery<BlogPost[]>({ return useQuery<BlogPost[]>({
+12
View File
@@ -0,0 +1,12 @@
export interface BlogPost {
id: string;
title: string;
slug: string;
summary: string;
content: string;
category: string;
imageUrl?: string;
authorName?: string;
isPublished: boolean;
publishedAt?: string;
}
@@ -1,5 +1,5 @@
'use client'; 'use client';
import { ContactProvider } from '../contexts/ContactContext'; import { ContactProvider } from '@/app/contexts/ContactContext';
import { ScrollProgress } from './ScrollProgress'; import { ScrollProgress } from './ScrollProgress';
import { ScrollToTop } from './ScrollToTop'; import { ScrollToTop } from './ScrollToTop';
import { Navbar } from './Navbar'; import { Navbar } from './Navbar';
File renamed without changes.
@@ -1,7 +1,7 @@
'use client'; 'use client';
import { useState } from 'react'; import { useState } from 'react';
import { X, Send, CheckCircle, AlertCircle, Loader2 } from 'lucide-react'; import { X, Send, CheckCircle, AlertCircle, Loader2 } from 'lucide-react';
import type { ModalProps } from '../types'; import type { ModalProps } from '@/app/types/ui';
const API_URL = process.env.NEXT_PUBLIC_API_URL ?? 'https://localhost:7001'; const API_URL = process.env.NEXT_PUBLIC_API_URL ?? 'https://localhost:7001';
@@ -1,6 +1,6 @@
'use client'; 'use client';
import { useState, useEffect } from 'react'; import { useState, useEffect } from 'react';
import type { ThemeProps } from '../types'; import type { ThemeProps } from '@/app/types/ui';
export const CookieBanner = ({ isNavyBg }: ThemeProps) => { export const CookieBanner = ({ isNavyBg }: ThemeProps) => {
const [visible, setVisible] = useState(false); const [visible, setVisible] = useState(false);
@@ -1,7 +1,7 @@
'use client'; 'use client';
import { ArrowUp } from 'lucide-react'; import { ArrowUp } from 'lucide-react';
import { motion, AnimatePresence } from 'framer-motion'; import { motion, AnimatePresence } from 'framer-motion';
import type { ThemeProps } from '../types'; import type { ThemeProps } from '@/app/types/ui';
import { type Dispatch, type SetStateAction, useState, useEffect } from 'react'; import { type Dispatch, type SetStateAction, useState, useEffect } from 'react';
const WHATSAPP_NUMBER = '529984814889'; const WHATSAPP_NUMBER = '529984814889';
@@ -2,8 +2,8 @@
import { Mail, MapPin, MessageCircle } from "lucide-react"; import { Mail, MapPin, MessageCircle } from "lucide-react";
import { FaFacebookF, FaLinkedinIn, FaMapMarkerAlt } from "react-icons/fa"; import { FaFacebookF, FaLinkedinIn, FaMapMarkerAlt } from "react-icons/fa";
import Link from "next/link"; import Link from "next/link";
import type { ThemeProps } from "../types"; import type { ThemeProps } from "@/app/types/ui";
import { pageLinks } from "../data/navigationData"; import { pageLinks } from '@/app/home/data/navigationData';
import { FaRegMessage } from "react-icons/fa6"; import { FaRegMessage } from "react-icons/fa6";
import { MdEmail } from "react-icons/md"; import { MdEmail } from "react-icons/md";
File renamed without changes.
@@ -5,7 +5,7 @@ import { Menu, X } from 'lucide-react';
import Link from 'next/link'; import Link from 'next/link';
import { usePathname } from 'next/navigation'; import { usePathname } from 'next/navigation';
import { Button } from './Button'; import { Button } from './Button';
import { pageLinks } from '../data/navigationData'; import { pageLinks } from '@/app/home/data/navigationData';
export const Navbar = () => { export const Navbar = () => {
const [scrolled, setScrolled] = useState(false); const [scrolled, setScrolled] = useState(false);
File renamed without changes.
File renamed without changes.
@@ -1,6 +1,6 @@
'use client'; 'use client';
import { createContext, useContext, useState } from 'react'; import { createContext, useContext, useState } from 'react';
import { ContactModal } from '../components/ContactModal'; import { ContactModal } from '@/app/components/ContactModal';
interface ContactCtx { interface ContactCtx {
open: () => void; open: () => void;
@@ -1,32 +1,32 @@
"use client"; "use client";
import { Suspense } from "react"; import { Suspense } from "react";
import dynamic from "next/dynamic"; import dynamic from "next/dynamic";
import { Hero } from "../sections/Hero"; import { Hero } from '@/app/home/sections/Hero';
import { Problem } from "../sections/Problem"; import { Problem } from '@/app/home/sections/Problem';
import { Machinery } from "../sections/Machinery"; import { Machinery } from '@/app/home/sections/Machinery';
import { Showcase } from "../sections/Showcase"; import { Showcase } from '@/app/home/sections/Showcase';
import { PlatformAdvantage } from "../sections/PlatformAdvantage"; import { PlatformAdvantage } from '@/app/home/sections/PlatformAdvantage';
import { Services } from "../sections/Services"; import { Services } from '@/app/home/sections/Services';
import { Testimonial } from "../sections/Testimonial"; import { Testimonial } from '@/app/home/sections/Testimonial';
import { Anatomy } from "../sections/Anatomy"; import { Anatomy } from '@/app/home/sections/Anatomy';
import { Process } from "../sections/Process"; import { Process } from '@/app/home/sections/Process';
import { Principles } from "../sections/Principles"; import { Principles } from '@/app/home/sections/Principles';
import { FAQ } from "../sections/FAQ"; import { FAQ } from '@/app/home/sections/FAQ';
import { CtaBanner } from "../sections/CtaBanner"; import { CtaBanner } from '@/app/home/sections/CtaBanner';
import { ContactSection } from "../sections/ContactSection"; import { ContactSection } from '@/app/home/sections/ContactSection';
const Clients = dynamic( const Clients = dynamic(
() => import("../sections/Clients").then((m) => ({ default: m.Clients })), () => import("@/app/home/sections/Clients").then((m) => ({ default: m.Clients })),
{ ssr: false }, { ssr: false },
); );
const Partners = dynamic( const Partners = dynamic(
() => import("../sections/Partners").then((m) => ({ default: m.Partners })), () => import("@/app/home/sections/Partners").then((m) => ({ default: m.Partners })),
{ ssr: false }, { ssr: false },
); );
const Portfolio = dynamic( const Portfolio = dynamic(
() => import("../sections/Portfolio").then((m) => ({ default: m.Portfolio })), () => import("@/app/home/sections/Portfolio").then((m) => ({ default: m.Portfolio })),
{ ssr: false }, { ssr: false },
); );
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -1,5 +1,5 @@
import { Code, Cloud, ShieldCheck, TrendingUp } from 'lucide-react'; import { Code, Cloud, ShieldCheck, TrendingUp } from 'lucide-react';
import type { ServiceItem } from '../types'; import type { ServiceItem } from '@/app/types/ui';
export const servicesData: ServiceItem[] = [ export const servicesData: ServiceItem[] = [
{ {
File renamed without changes.
File renamed without changes.
@@ -1,7 +1,7 @@
'use client'; 'use client';
import { motion } from 'framer-motion'; import { motion } from 'framer-motion';
import type { ThemeProps } from '../types'; import type { ThemeProps } from '@/app/types/ui';
import { anatomyLayers as layers } from '../data/anatomyData'; import { anatomyLayers as layers } from '@/app/home/data/anatomyData';
export const Anatomy = ({ isNavyBg }: ThemeProps) => { export const Anatomy = ({ isNavyBg }: ThemeProps) => {
const bg = isNavyBg ? '#0d1117' : '#f5f5f3'; const bg = isNavyBg ? '#0d1117' : '#f5f5f3';
@@ -1,10 +1,10 @@
"use client"; "use client";
import { useState, useEffect } from "react"; import { useState, useEffect } from "react";
import { motion } from "framer-motion"; import { motion } from "framer-motion";
import Loader from "../components/Loader"; import Loader from '@/app/components/Loader';
import { useCompanies } from "../services/companies"; import { useCompanies } from "@/app/home/services/companies";
import { assetUrl } from "../services/api"; import { assetUrl } from "@/app/services/api";
import type { ThemeProps } from "../types"; import type { ThemeProps } from "@/app/types/ui";
function ClientsInner({ isNavyBg }: ThemeProps) { function ClientsInner({ isNavyBg }: ThemeProps) {
const { data, isLoading } = useCompanies(); const { data, isLoading } = useCompanies();
@@ -2,7 +2,7 @@
import { useState } from 'react'; import { useState } from 'react';
import { motion } from 'framer-motion'; import { motion } from 'framer-motion';
import { Send, CheckCircle, AlertCircle, Loader2 } from 'lucide-react'; import { Send, CheckCircle, AlertCircle, Loader2 } from 'lucide-react';
import type { ThemeProps } from '../types'; import type { ThemeProps } from '@/app/types/ui';
const API_URL = process.env.NEXT_PUBLIC_API_URL ?? 'https://localhost:7001'; const API_URL = process.env.NEXT_PUBLIC_API_URL ?? 'https://localhost:7001';
@@ -1,8 +1,8 @@
"use client"; "use client";
import { motion } from "framer-motion"; import { motion } from "framer-motion";
import { ArrowRight } from "lucide-react"; import { ArrowRight } from "lucide-react";
import { Button } from "../components/Button"; import { Button } from '@/app/components/Button';
import type { ThemeProps } from "../types"; import type { ThemeProps } from "@/app/types/ui";
export const CtaBanner = ({ isNavyBg }: ThemeProps) => { export const CtaBanner = ({ isNavyBg }: ThemeProps) => {
const scrollToContact = () => { const scrollToContact = () => {
@@ -2,8 +2,8 @@
import { useState } from 'react'; import { useState } from 'react';
import { motion } from 'framer-motion'; import { motion } from 'framer-motion';
import { Plus } from 'lucide-react'; import { Plus } from 'lucide-react';
import type { ThemeProps } from '../types'; import type { ThemeProps } from '@/app/types/ui';
import { faqs } from '../data/faqData'; import { faqs } from '@/app/home/data/faqData';
export const FAQ = ({ isNavyBg }: ThemeProps) => { export const FAQ = ({ isNavyBg }: ThemeProps) => {
const [open, setOpen] = useState<number | null>(null); const [open, setOpen] = useState<number | null>(null);
@@ -1,10 +1,10 @@
'use client'; 'use client';
import { motion } from 'framer-motion'; import { motion } from 'framer-motion';
import { ArrowRight } from 'lucide-react'; import { ArrowRight } from 'lucide-react';
import type { ThemeProps } from '../types'; import type { ThemeProps } from '@/app/types/ui';
import { Button } from '../components/Button'; import { Button } from '@/app/components/Button';
import { SystemMap } from './SystemMap'; import { SystemMap } from './SystemMap';
import { useContact } from '../contexts/ContactContext'; import { useContact } from '@/app/contexts/ContactContext';
const ease = [0.22, 1, 0.36, 1] as const; const ease = [0.22, 1, 0.36, 1] as const;
@@ -1,8 +1,8 @@
'use client'; 'use client';
import { useState } from 'react'; import { useState } from 'react';
import { motion } from 'framer-motion'; import { motion } from 'framer-motion';
import type { ThemeProps } from '../types'; import type { ThemeProps } from '@/app/types/ui';
import { machineryData } from '../data/machineryData'; import { machineryData } from '@/app/home/data/machineryData';
export const Machinery = ({ isNavyBg }: ThemeProps) => { export const Machinery = ({ isNavyBg }: ThemeProps) => {
const [hovered, setHovered] = useState<number | null>(null); const [hovered, setHovered] = useState<number | null>(null);
@@ -1,10 +1,10 @@
"use client"; "use client";
import { useState, useEffect } from "react"; import { useState, useEffect } from "react";
import { motion } from "framer-motion"; import { motion } from "framer-motion";
import Loader from "../components/Loader"; import Loader from '@/app/components/Loader';
import { useTechPartners } from "../services/techPartners"; import { useTechPartners } from "@/app/home/services/techPartners";
import { assetUrl } from "../services/api"; import { assetUrl } from "@/app/services/api";
import type { ThemeProps } from "../types"; import type { ThemeProps } from "@/app/types/ui";
function PartnersInner({ isNavyBg }: ThemeProps) { function PartnersInner({ isNavyBg }: ThemeProps) {
const { data, isLoading } = useTechPartners(); const { data, isLoading } = useTechPartners();
@@ -1,8 +1,8 @@
'use client'; 'use client';
import { motion } from 'framer-motion'; import { motion } from 'framer-motion';
import { X, Check } from 'lucide-react'; import { X, Check } from 'lucide-react';
import type { ThemeProps } from '../types'; import type { ThemeProps } from '@/app/types/ui';
import { comparisonRows, proofCards } from '../data/platformAdvantageData'; import { comparisonRows, proofCards } from '@/app/home/data/platformAdvantageData';
export const PlatformAdvantage = ({ isNavyBg }: ThemeProps) => { export const PlatformAdvantage = ({ isNavyBg }: ThemeProps) => {
return ( return (
@@ -1,10 +1,10 @@
"use client"; "use client";
import { useState, useEffect } from "react"; import { useState, useEffect } from "react";
import { motion } from "framer-motion"; import { motion } from "framer-motion";
import Loader from "../components/Loader"; import Loader from '@/app/components/Loader';
import { usePortfolio } from "../services/portfolio"; import { usePortfolio } from "@/app/portafolio/services/portfolio";
import { assetUrl } from "../services/api"; import { assetUrl } from "@/app/services/api";
import type { ThemeProps } from "../types"; import type { ThemeProps } from "@/app/types/ui";
function PortfolioInner({ isNavyBg }: ThemeProps) { function PortfolioInner({ isNavyBg }: ThemeProps) {
const { data, isLoading } = usePortfolio(); const { data, isLoading } = usePortfolio();
@@ -1,7 +1,7 @@
'use client'; 'use client';
import { motion } from 'framer-motion'; import { motion } from 'framer-motion';
import type { ThemeProps } from '../types'; import type { ThemeProps } from '@/app/types/ui';
import { principles } from '../data/principlesData'; import { principles } from '@/app/home/data/principlesData';
export const Principles = ({ isNavyBg }: ThemeProps) => { export const Principles = ({ isNavyBg }: ThemeProps) => {
const bg = isNavyBg ? '#0d1117' : '#f5f5f3'; const bg = isNavyBg ? '#0d1117' : '#f5f5f3';
@@ -1,6 +1,6 @@
'use client'; 'use client';
import { motion } from 'framer-motion'; import { motion } from 'framer-motion';
import type { ThemeProps } from '../types'; import type { ThemeProps } from '@/app/types/ui';
export const Problem = ({ isNavyBg }: ThemeProps) => { export const Problem = ({ isNavyBg }: ThemeProps) => {
const bg = isNavyBg ? '#0d1117' : '#f5f5f3'; const bg = isNavyBg ? '#0d1117' : '#f5f5f3';
@@ -1,7 +1,7 @@
'use client'; 'use client';
import { motion } from 'framer-motion'; import { motion } from 'framer-motion';
import type { ThemeProps } from '../types'; import type { ThemeProps } from '@/app/types/ui';
import { processSteps as steps } from '../data/processData'; import { processSteps as steps } from '@/app/home/data/processData';
export const Process = ({ isNavyBg }: ThemeProps) => { export const Process = ({ isNavyBg }: ThemeProps) => {
const bg = isNavyBg ? '#001f5b' : '#ffffff'; const bg = isNavyBg ? '#001f5b' : '#ffffff';
@@ -1,8 +1,8 @@
'use client'; 'use client';
import { motion } from 'framer-motion'; import { motion } from 'framer-motion';
import { Check } from 'lucide-react'; import { Check } from 'lucide-react';
import type { ThemeProps } from '../types'; import type { ThemeProps } from '@/app/types/ui';
import { servicesData } from '../data/servicesData'; import { servicesData } from '@/app/home/data/servicesData';
export const Services = ({ isNavyBg }: ThemeProps) => { export const Services = ({ isNavyBg }: ThemeProps) => {
return ( return (
@@ -1,9 +1,9 @@
"use client"; "use client";
import { motion } from "framer-motion"; import { motion } from "framer-motion";
import Loader from "../components/Loader"; import Loader from '@/app/components/Loader';
import { useProducts } from "../services/products"; import { useProducts } from "@/app/productos/services/products";
import { assetUrl } from "../services/api"; import { assetUrl } from "@/app/services/api";
import type { ThemeProps } from "../types"; import type { ThemeProps } from "@/app/types/ui";
export const Showcase = ({ isNavyBg }: ThemeProps) => { export const Showcase = ({ isNavyBg }: ThemeProps) => {
const { data, isLoading } = useProducts(); const { data, isLoading } = useProducts();
@@ -1,7 +1,7 @@
'use client'; 'use client';
import { motion } from 'framer-motion'; import { motion } from 'framer-motion';
import type { ThemeProps } from '../types'; import type { ThemeProps } from '@/app/types/ui';
import { stackGroups } from '../data/stackData'; import { stackGroups } from '@/app/home/data/stackData';
export const Stack = ({ isNavyBg }: ThemeProps) => { export const Stack = ({ isNavyBg }: ThemeProps) => {
const bg = isNavyBg ? '#0f1520' : '#f9f9f7'; const bg = isNavyBg ? '#0f1520' : '#f9f9f7';
File renamed without changes.
@@ -1,9 +1,9 @@
"use client"; "use client";
import { useState, useEffect } from "react"; import { useState, useEffect } from "react";
import { motion, AnimatePresence } from "framer-motion"; import { motion, AnimatePresence } from "framer-motion";
import Loader from "../components/Loader"; import Loader from '@/app/components/Loader';
import { useTestimonials } from "../services/testimonials"; import { useTestimonials } from "@/app/home/services/testimonials";
import type { ThemeProps } from "../types"; import type { ThemeProps } from "@/app/types/ui";
export const Testimonial = ({ isNavyBg }: ThemeProps) => { export const Testimonial = ({ isNavyBg }: ThemeProps) => {
const { data, isLoading } = useTestimonials(); const { data, isLoading } = useTestimonials();
@@ -1,12 +1,6 @@
import { useQuery } from '@tanstack/react-query'; import { useQuery } from '@tanstack/react-query';
import { apiFetch } from './api'; import { apiFetch } from '@/app/services/api';
import type { Company } from '@/app/home/types/companies';
export interface Company {
id: string;
name: string;
logoUrl?: string;
showInLanding?: boolean;
}
export function useCompanies() { export function useCompanies() {
return useQuery<Company[]>({ return useQuery<Company[]>({
@@ -1,15 +1,6 @@
import { useQuery } from '@tanstack/react-query'; import { useQuery } from '@tanstack/react-query';
import { apiFetch } from './api'; import { apiFetch } from '@/app/services/api';
import type { TechPartner } from '@/app/home/types/techPartners';
export interface TechPartner {
id: string;
name: string;
logoUrl?: string;
category?: string;
websiteUrl?: string;
displayOrder: number;
isActive: boolean;
}
export function useTechPartners() { export function useTechPartners() {
return useQuery<TechPartner[]>({ return useQuery<TechPartner[]>({
@@ -1,5 +1,6 @@
import { useQuery } from '@tanstack/react-query'; import { useQuery } from '@tanstack/react-query';
import { apiFetch } from './api'; import { apiFetch } from '@/app/services/api';
import type { Testimonial } from '@/app/home/types/testimonials';
interface OnboardingCompleted { interface OnboardingCompleted {
clientCompanyName: string; clientCompanyName: string;
@@ -7,12 +8,6 @@ interface OnboardingCompleted {
testimonialAuthor?: string; testimonialAuthor?: string;
} }
export interface Testimonial {
quote: string;
author: string;
company: string;
}
export function useTestimonials() { export function useTestimonials() {
return useQuery<Testimonial[]>({ return useQuery<Testimonial[]>({
queryKey: ['testimonials'], queryKey: ['testimonials'],
+6
View File
@@ -0,0 +1,6 @@
export interface Company {
id: string;
name: string;
logoUrl?: string;
showInLanding?: boolean;
}
+9
View File
@@ -0,0 +1,9 @@
export interface TechPartner {
id: string;
name: string;
logoUrl?: string;
category?: string;
websiteUrl?: string;
displayOrder: number;
isActive: boolean;
}
+5
View File
@@ -0,0 +1,5 @@
export interface Testimonial {
quote: string;
author: string;
company: string;
}
File renamed without changes.
+1 -1
View File
@@ -1,7 +1,7 @@
import type { Metadata, Viewport } from 'next'; import type { Metadata, Viewport } from 'next';
import './globals.css'; import './globals.css';
import { Providers } from './providers'; import { Providers } from './providers';
import { AppShell } from '../components/AppShell'; import { AppShell } from '@/app/components/AppShell';
export const metadata: Metadata = { export const metadata: Metadata = {
metadataBase: new URL('https://rynext.com.mx'), metadataBase: new URL('https://rynext.com.mx'),
+1 -1
View File
@@ -1,4 +1,4 @@
import Loader from '../components/Loader'; import Loader from '@/app/components/Loader';
export default function Loading() { export default function Loading() {
return ( return (
+1 -1
View File
@@ -1,5 +1,5 @@
import type { Metadata } from 'next'; import type { Metadata } from 'next';
import { HomePage } from './HomePage'; import { HomePage } from '@/app/home/HomePage';
export const metadata: Metadata = { export const metadata: Metadata = {
title: 'Rynext Technologies | Software Empresarial 100% Mexicano', title: 'Rynext Technologies | Software Empresarial 100% Mexicano',
+3 -3
View File
@@ -1,9 +1,9 @@
'use client'; 'use client';
import { useState, useEffect } from 'react'; import { useState, useEffect } from 'react';
import { motion } from 'framer-motion'; import { motion } from 'framer-motion';
import Loader from '../../components/Loader'; import Loader from '@/app/components/Loader';
import { usePortfolio } from '../../services/portfolio'; import { usePortfolio } from '@/app/portafolio/services/portfolio';
import { assetUrl } from '../../services/api'; import { assetUrl } from '@/app/services/api';
const bg = '#f9f9f7'; const bg = '#f9f9f7';
const text = '#0a0a0a'; const text = '#0a0a0a';
+1 -1
View File
@@ -1,4 +1,4 @@
import Loader from '../../components/Loader'; import Loader from '@/app/components/Loader';
export default function Loading() { export default function Loading() {
return ( return (
+11
View File
@@ -0,0 +1,11 @@
import { useQuery } from '@tanstack/react-query';
import { apiFetch } from '@/app/services/api';
import type { PortfolioProject } from '@/app/portafolio/types/portfolio';
export function usePortfolio() {
return useQuery<PortfolioProject[]>({
queryKey: ['portfolio'],
queryFn: () => apiFetch<PortfolioProject[]>('/api/portfolio/public'),
staleTime: 1000 * 60 * 5,
});
}
@@ -1,6 +1,3 @@
import { useQuery } from '@tanstack/react-query';
import { apiFetch } from './api';
export interface PortfolioImage { export interface PortfolioImage {
id: string; id: string;
portfolioEntryId: string; portfolioEntryId: string;
@@ -30,11 +27,3 @@ export interface PortfolioProject {
technologies: PortfolioTechnology[]; technologies: PortfolioTechnology[];
images: PortfolioImage[]; images: PortfolioImage[];
} }
export function usePortfolio() {
return useQuery<PortfolioProject[]>({
queryKey: ['portfolio'],
queryFn: () => apiFetch<PortfolioProject[]>('/api/portfolio/public'),
staleTime: 1000 * 60 * 5,
});
}
+1 -1
View File
@@ -1,4 +1,4 @@
import Loader from '../../components/Loader'; import Loader from '@/app/components/Loader';
export default function Loading() { export default function Loading() {
return ( return (
+3 -3
View File
@@ -1,9 +1,9 @@
'use client'; 'use client';
import { useState, useEffect } from 'react'; import { useState, useEffect } from 'react';
import { motion } from 'framer-motion'; import { motion } from 'framer-motion';
import Loader from '../../components/Loader'; import Loader from '@/app/components/Loader';
import { useProducts } from '../../services/products'; import { useProducts } from '@/app/productos/services/products';
import { assetUrl } from '../../services/api'; import { assetUrl } from '@/app/services/api';
const fadeUp = { const fadeUp = {
hidden: { opacity: 0, y: 28 }, hidden: { opacity: 0, y: 28 },
+1 -1
View File
@@ -1,4 +1,4 @@
import Loader from '../../components/Loader'; import Loader from '@/app/components/Loader';
export default function Loading() { export default function Loading() {
return ( return (
@@ -1,14 +1,6 @@
import { useQuery } from '@tanstack/react-query'; import { useQuery } from '@tanstack/react-query';
import { apiFetch } from './api'; import { apiFetch } from '@/app/services/api';
import type { Product } from '@/app/productos/types/products';
export interface Product {
id: string;
name: string;
description?: string;
imageUrl?: string;
badges: string[];
isActive: boolean;
}
export function useProducts() { export function useProducts() {
return useQuery<Product[]>({ return useQuery<Product[]>({
+8
View File
@@ -0,0 +1,8 @@
export interface Product {
id: string;
name: string;
description?: string;
imageUrl?: string;
badges: string[];
isActive: boolean;
}
File renamed without changes.
+2 -2
View File
@@ -1,6 +1,6 @@
import type { MetadataRoute } from 'next'; import type { MetadataRoute } from 'next';
import { API_URL } from '../services/api'; import { API_URL } from '@/app/services/api';
import type { BlogPost } from '../services/blog'; import type { BlogPost } from '@/app/blog/types/blog';
export const revalidate = 3600; export const revalidate = 3600;
+3 -3
View File
@@ -1,9 +1,9 @@
'use client'; 'use client';
import { useState, useEffect } from 'react'; import { useState, useEffect } from 'react';
import { motion } from 'framer-motion'; import { motion } from 'framer-motion';
import Loader from '../../components/Loader'; import Loader from '@/app/components/Loader';
import { useTeam, groupByDepartment } from '../../services/team'; import { useTeam, groupByDepartment } from '@/app/sobre-nosotros/services/team';
import { valores, porQueRynext } from '../../data/sobreNosotrosData'; import { valores, porQueRynext } from '@/app/home/data/sobreNosotrosData';
const TEAM_IMAGE = 'https://images.unsplash.com/photo-1522071820081-009f0129c71c?w=1200&q=80'; const TEAM_IMAGE = 'https://images.unsplash.com/photo-1522071820081-009f0129c71c?w=1200&q=80';
+1 -1
View File
@@ -1,4 +1,4 @@
import Loader from '../../components/Loader'; import Loader from '@/app/components/Loader';
export default function Loading() { export default function Loading() {
return ( return (
@@ -1,21 +1,6 @@
import { useQuery } from '@tanstack/react-query'; import { useQuery } from '@tanstack/react-query';
import { apiFetch } from './api'; import { apiFetch } from '@/app/services/api';
import type { Department, TeamMember } from '@/app/sobre-nosotros/types/team';
export interface TeamMember {
id: string;
firstName: string;
lastName: string;
positionName?: string;
departmentName?: string;
departmentOrder?: number;
positionOrder?: number;
}
export interface Department {
name: string;
order: number;
members: TeamMember[];
}
export function useTeam() { export function useTeam() {
return useQuery<TeamMember[]>({ return useQuery<TeamMember[]>({
+15
View File
@@ -0,0 +1,15 @@
export interface TeamMember {
id: string;
firstName: string;
lastName: string;
positionName?: string;
departmentName?: string;
departmentOrder?: number;
positionOrder?: number;
}
export interface Department {
name: string;
order: number;
members: TeamMember[];
}
File renamed without changes.