diff --git a/index.html b/index.html index e4b78ea..bfe277e 100644 --- a/index.html +++ b/index.html @@ -4,7 +4,7 @@ - Vite + React + TS + Inmobiliaria "Sin nombre"
diff --git a/src/components/AboutUs/AboutUs.tsx b/src/components/AboutUs/AboutUs.tsx deleted file mode 100644 index 5953896..0000000 --- a/src/components/AboutUs/AboutUs.tsx +++ /dev/null @@ -1,29 +0,0 @@ -export default function AboutUs () { - return ( - -
-

Nosotros

- -
-
-

- Desde Inmobiliaria, nos distinguimos por nuestra transparencia y empatía en cada interacción, creando conexiones genuinas con nuestros clientes. Nuestro equipo está compuesto por profesionales comprometidos, guiados por la búsqueda constante de la excelencia. -

-

- Nuestra ética de trabajo, arraigada en la integridad, confianza y entrega excepcional, es la columna vertebral de nuestra firma. Compartamos un viaje personalizado hacia la realización de tus sueños inmobiliarios y la construcción de tu historia de vida. -

-
- -
- Gente del equipo -
-

Misión

-

Ofrecer soluciones excepcionales, personalizadas y confiables.

-
-
- -
- -
- ) -} diff --git a/src/components/CardProperty/CardProperty.tsx b/src/components/CardProperty/CardProperty.tsx deleted file mode 100644 index ef6a1de..0000000 --- a/src/components/CardProperty/CardProperty.tsx +++ /dev/null @@ -1,29 +0,0 @@ -export default function CardProperty () { - return ( -
-

Titulo

-
- -
-
-

Alquiler Mensual

-

Zona:

-

Dimensiones:

-
-
-
- - - - - - - - -
- - -
-
- ) -} diff --git a/src/components/Carousel/Carousel.css b/src/components/Carousel/Carousel.css deleted file mode 100644 index aa05dcd..0000000 --- a/src/components/Carousel/Carousel.css +++ /dev/null @@ -1,121 +0,0 @@ -ul, -li { - list-style: none; - white-space: nowrap; -} -li{ - width: 100%; - height: 100%; -} - -img { - width: 100%; - height: 100%; - object-fit:cover; -} - -/* Main container */ - -.main-container { - margin: 0 auto; -} - -/* Slider container */ -.slider-container { - position: relative; - height: 100% -} - -/* dots carrusel */ -.dots-container { - display: flex; - justify-content: center; -} - -.dot-container-item { - margin: 8px 3px; - cursor: pointer; - font-size: 12px; - text-align: center; -} - -/* Arrows */ -.leftArrow { - position: absolute; - top: 50%; - transform: translate(0, -50%); - left: 32px; - font-size: 50px; - font-weight: 700; - color: #fff; - z-index: 1; - cursor: pointer; -} - -.rightArrow { - position: absolute; - top: 50%; - transform: translate(0, -50%); - right: 32px; - font-size: 50px; - font-weight: 700; - color: #fff; - z-index: 1; - cursor: pointer; -} - -.container-images{ - width: 100%; - height: 100%; - border: 1px solid #eee; - overflow: hidden; - -} - -@media (min-width: 640px) { - .container-images { - width: 100%; - height: 100%; - border-radius: 10px; - border: 1px solid #eee; - overflow: hidden; - } - } - - -div.active { - background: #ccc; - width: 15px; - height: 15px; - border-radius: 50%; -} - -ul { - list-style: none; - white-space: nowrap; - overflow-x: auto; - padding: 0; - margin: 0; - } - - li { - display: inline-block; - } - -.imagen{ - margin-top: -50px; - height: auto; - object-fit: cover; -} - -@media (min-width: 640px) { - .imagen{ - margin-top: -70px; - } - } - - @media (min-width: 1024px) { - .imagen{ - margin-top: -170px; - } - } \ No newline at end of file diff --git a/src/components/Carousel/Carousel.tsx b/src/components/Carousel/Carousel.tsx deleted file mode 100644 index 885caaf..0000000 --- a/src/components/Carousel/Carousel.tsx +++ /dev/null @@ -1,107 +0,0 @@ -import { useEffect, useRef, useState, useCallback } from 'react' -import { data, DataType } from './data' - -import './Carousel.css' - -export default function Carousel () { - const listRef = useRef(null) - const [currentIndex, setCurrentIndex] = useState(0) - - const scrollStep = useCallback((now: number, listNode: HTMLUListElement, startScroll: number, scrollLeft: number, scrollDuration: number, startTime: number) => { - const elapsed = now - startTime - const t = Math.min(elapsed / scrollDuration, 1) - listNode.scrollLeft = startScroll + (scrollLeft - startScroll) * t - if (t < 1) { - window.requestAnimationFrame((now) => scrollStep(now, listNode, startScroll, scrollLeft, scrollDuration, startTime)) - } - }, []) - - useEffect(() => { - const listNode = listRef.current - const imgNode = listNode?.querySelectorAll('li > div > img')[currentIndex] - - if (imgNode && listNode) { - const imgElement = imgNode as HTMLImageElement - const scrollLeft = imgElement.offsetLeft - (listNode.offsetWidth / 2) + (imgElement.offsetWidth / 2) - - const scrollDuration = 500 - const startTime = performance.now() - const startScroll = listNode.scrollLeft - - window.requestAnimationFrame((now) => scrollStep(now, listNode, startScroll, scrollLeft, scrollDuration, startTime)) - } - }, [currentIndex, scrollStep]) - - useEffect(() => { - const intervalId = setInterval(() => { - setCurrentIndex((prevIndex) => (prevIndex + 1) % data.length) - }, 6000) - - return () => clearInterval(intervalId) - }, []) - - const goToSlide = (indice: number) => { - setCurrentIndex(indice) - } - - const scrollToImage = (dir: string) => { - if (dir === 'prev') { - setCurrentIndex((curr) => { - const isFirstSlide = currentIndex === 0 - return isFirstSlide ? 0 : curr - 1 - }) - } else { - const isLastSlide = currentIndex === data.length - 1 - if (!isLastSlide) { - setCurrentIndex(currentIndex + 1) - } - } - } - - return ( -
-
-
scrollToImage('prev')} - > - ❬ -
-
scrollToImage('next')} - > - ❭ -
-
-
    - {data.map((item: DataType) => { - return ( -
  • - -
  • - ) - })} -
-
-
- {data.map((_, idx) => ( -
goToSlide(idx)} - tabIndex={-1} - onMouseDown={(e) => e.preventDefault()} - > - ⚉ -
- ))} -
-
-
- ) -} diff --git a/src/components/Carousel/data.ts b/src/components/Carousel/data.ts deleted file mode 100644 index 0edaa67..0000000 --- a/src/components/Carousel/data.ts +++ /dev/null @@ -1,12 +0,0 @@ -export type DataType = { - id: number; - imgUrl: string; -}; - -export const data: DataType[] = [ - { id: 1, imgUrl: 'https://i.blogs.es/c68014/casa-3d/840_560.jpeg' }, - { id: 2, imgUrl: 'https://imagenes.heraldo.es/files/image_990_v3/uploads/imagenes/2021/04/30/casa-prefabricada-gsc.jpeg' }, - { id: 3, imgUrl: 'https://img.asmedia.epimg.net/resizer/oQJOsC2PoUbi_M2l-HM4ycq74rE=/1472x828/cloudfront-eu-central-1.images.arcpublishing.com/diarioas/AECCXYLF7RJXHG6HDB643FLIDU.jpg' }, - { id: 4, imgUrl: 'https://i.blogs.es/c68014/casa-3d/840_560.jpeg' }, - { id: 5, imgUrl: 'https://i.blogs.es/c68014/casa-3d/840_560.jpeg' } -] diff --git a/src/layouts/layout.css b/src/components/FormLogReg/FormLogReg.css similarity index 100% rename from src/layouts/layout.css rename to src/components/FormLogReg/FormLogReg.css diff --git a/src/components/FormLogReg/FormLogReg.tsx b/src/components/FormLogReg/FormLogReg.tsx new file mode 100644 index 0000000..25bc3f1 --- /dev/null +++ b/src/components/FormLogReg/FormLogReg.tsx @@ -0,0 +1,69 @@ +import React from 'react' +import Inputs from './components/Inputs' +import './FormLogReg.css' + +interface Input { + id: string; // Identificador único + label: string; + placeholder: string; + type: string; + icon?: string; +} + +interface FormLogRegProps { + type: 'login' | 'register'; + inputs: Input[]; +} + +const FormLogReg: React.FC = ({ type, inputs }) => { + return ( + <> +
+ +

INMOBILIARIA

+

¡Bienvenido!

+
+
+ + {type === 'login' + ? ( +
+
+ +

Recordarme

+
+
¿Olvidaste tu contraseña?
+
+ ) + : ( +
+ Acepto los términos y condiciones de uso +
+ )} + {type === 'login' + ? ( + + ) + : ( + + )} + + +
+ {type === 'login' + ? ( +

+ ¿No tienes cuenta? Regístrate +

+ ) + : ( +

+ ¿Ya tienes cuenta? Inicia sesión +

+ )} +
+ + ) +} + +export default FormLogReg diff --git a/src/components/FormLogReg/components/InputComponent.tsx b/src/components/FormLogReg/components/InputComponent.tsx new file mode 100644 index 0000000..fe978f8 --- /dev/null +++ b/src/components/FormLogReg/components/InputComponent.tsx @@ -0,0 +1,27 @@ +import React from 'react' + +// Define las propiedades para el componente Input +interface InputProps { + input: { + id: string; + label: string; + placeholder: string; + type: string; + icon?: string; + }; +} + +const InputComponent: React.FC = ({ input }) => { + return ( +
+ + + {input.icon && } +
+ ) +} + +export default InputComponent diff --git a/src/components/FormLogReg/components/Inputs.tsx b/src/components/FormLogReg/components/Inputs.tsx new file mode 100644 index 0000000..7365287 --- /dev/null +++ b/src/components/FormLogReg/components/Inputs.tsx @@ -0,0 +1,26 @@ +import React from 'react' +import InputComponent from './InputComponent' + +interface InputProps { + id: string; + label: string; + placeholder: string; + type: string; + icon?: string; +} + +interface InputsProps { + inputs: InputProps[]; +} + +const Inputs: React.FC = ({ inputs }) => { + return ( + <> + {inputs.map((input) => ( + + ))} + + ) +} + +export default Inputs diff --git a/src/components/Header/BurgerButton.tsx b/src/components/Header/BurgerButton.tsx deleted file mode 100644 index 21def3d..0000000 --- a/src/components/Header/BurgerButton.tsx +++ /dev/null @@ -1,30 +0,0 @@ -interface BurgerButtonProps { - setOpen: (value: boolean) => void; -} - -const BurgerButton: React.FC = ({ setOpen }) => { - return ( - - ) -} - -export default BurgerButton diff --git a/src/components/Header/Header.tsx b/src/components/Header/Header.tsx deleted file mode 100644 index df209e5..0000000 --- a/src/components/Header/Header.tsx +++ /dev/null @@ -1,63 +0,0 @@ -import BurgerButton from './BurgerButton' -import SideBar from './SideBar' - -const LupaIcon = () => ( - - - -) - -interface HeaderProps { - open: boolean; - setOpen: React.Dispatch>; -} - -export default function Header ({ open, setOpen }: HeaderProps) { - return ( - <> -
- -

Inmobiliaria

- -
- -
- - - - - ) -} diff --git a/src/components/Header/Icons.tsx b/src/components/Header/Icons.tsx deleted file mode 100644 index e0881f0..0000000 --- a/src/components/Header/Icons.tsx +++ /dev/null @@ -1,54 +0,0 @@ -export const PerfilIcon = () => ( - - - -) - -export const CorazonIcon = () => ( - - - -) - -export const CampanaIcon = () => ( - - - -) - -export const RelojIcon = () => ( - - - -) - -export const EngranajeIcon = () => ( - - - - -) - -export const AyudaIcon = () => ( - - - -) - -export const AcercaDeIcon = () => ( - - - -) - -export const LlaveIcon = () => ( - - - -) - -export const FlechaIcon = () => ( - - - -) diff --git a/src/components/Header/ListItems.tsx b/src/components/Header/ListItems.tsx deleted file mode 100644 index 7792e92..0000000 --- a/src/components/Header/ListItems.tsx +++ /dev/null @@ -1,19 +0,0 @@ -// ListItems.tsx -interface ListItemsProps { - icono: React.FC; - texto: string; - url: string; - open: boolean -} - -export default function ListItems ({ icono: Icono, texto, url }: ListItemsProps) { - return ( - - -

{texto}

-
- ) -} diff --git a/src/components/Header/Profile.tsx b/src/components/Header/Profile.tsx deleted file mode 100644 index bd13a49..0000000 --- a/src/components/Header/Profile.tsx +++ /dev/null @@ -1,24 +0,0 @@ -interface PerfilProps { - perfilIMG?: string; - PerfilName: string; - open: boolean; -} - -export default function Profile ({ perfilIMG = 'https://www.pngall.com/wp-content/uploads/12/Avatar-Profile-Vector-PNG-Photo.png', PerfilName }: PerfilProps) { - const maxLength = 10 // Define tu longitud máxima aquí - const trimmedName = PerfilName.length > maxLength ? PerfilName.substring(0, maxLength) + '...' : PerfilName - - return ( - <> -
-
- -
-

{`Hola ${trimmedName}!`} -

-
- - ) -} diff --git a/src/components/Header/SideBar.tsx b/src/components/Header/SideBar.tsx deleted file mode 100644 index c870618..0000000 --- a/src/components/Header/SideBar.tsx +++ /dev/null @@ -1,70 +0,0 @@ -import { useRef, useEffect } from 'react' -import Profile from './Profile' -import ListItems from './ListItems' -import { PerfilIcon, FlechaIcon, CorazonIcon, CampanaIcon, RelojIcon, EngranajeIcon, AyudaIcon, AcercaDeIcon, LlaveIcon } from './Icons' - -interface SideBarProps { - setOpen: (value: boolean) => void; - open: boolean; -} - -const SideBar: React.FC = ({ setOpen, open }) => { - const sidebarRef = useRef(null) - - useEffect(() => { - function handleClickOutside (event: MouseEvent) { - if (sidebarRef.current && !sidebarRef.current.contains(event.target as Node)) { - setOpen(false) - } - } - - document.addEventListener('mousedown', handleClickOutside) - return () => { - document.removeEventListener('mousedown', handleClickOutside) - } - }, [setOpen]) - - return ( -
-
-
- - -
- - - - - - -
- - - - - -
- -
- -
-
- ) -} - -export default SideBar diff --git a/src/components/InfoCards/InfoCards.tsx b/src/components/InfoCards/InfoCards.tsx deleted file mode 100644 index ca7f098..0000000 --- a/src/components/InfoCards/InfoCards.tsx +++ /dev/null @@ -1,82 +0,0 @@ -interface Propiedad { - Nombre: string; - Zona: string; - Dimensiones: string; - AlquilerMensual?: number; - PrecioDeCompra?: number; - id: number; - Imagen: string; -} - -interface SvgProps { - // Add necessary props your SVG component requires - // e.g., size, color, etc. -} - -interface InfoCardsProps { - Titulo: string; - Texto: string; - Propiedades: Propiedad[]; - SvgContentChico: React.ComponentType; - SvgContentGrande: React.ComponentType; -} - -export default function InfoCards ({ Titulo, Texto, Propiedades, SvgContentChico, SvgContentGrande }: InfoCardsProps) { - return ( - <> - - -
-
-
- - {SvgContentChico && } -

{Titulo}

-
- -

{Titulo}

-
-
- {SvgContentGrande && } -
- -

{Texto}

-
-

{Texto}

-
- -
- { - Propiedades.map((propiedad) => ( -
-
-

{propiedad.Nombre}

-
-

Zona: {propiedad.Zona}

-

Dimensiones: {propiedad.Dimensiones}

- { - propiedad.AlquilerMensual ? (

Alquiler Mensual: {propiedad.AlquilerMensual}

) : (

Precio De Compra: {propiedad.PrecioDeCompra}

) - } -
- leer mas -
-
- -
-
- )) - } -
- -
- - ) -} diff --git a/src/components/MainBanner/MainBanner.tsx b/src/components/MainBanner/MainBanner.tsx deleted file mode 100644 index 4ba48f5..0000000 --- a/src/components/MainBanner/MainBanner.tsx +++ /dev/null @@ -1,56 +0,0 @@ -export default function InfoHome () { - return ( -
-
-
- Persona recibiendo unas llaves -
- -
-

- Tu hogar, tu estilo, nuestra confianza -

-

- Negocios inmobiliarios personalizados -

-
-

- En el ámbito inmobiliario, nos destacamos como tu aliado de confianza. Con décadas de experiencia, proporcionamos soluciones personalizadas y seguras. -

-

- Nuestra sólida reputación se construye sobre la transparencia, integridad y un compromiso constante con la satisfacción del cliente. Más que ofrecerte simples servicios, te brindamos un acompañamiento profesional y cercano en cada etapa de tu viaje. -

-

- Deposita tu confianza en nosotros para recibir orientación experta. -

-
-
-
- -
-
-

- Tu hogar, tu estilo, nuestra confianza -

-

- Negocios inmobiliarios personalizados -

-
-

- En el ámbito inmobiliario, nos destacamos como tu aliado de confianza. Con décadas de experiencia, proporcionamos soluciones personalizadas y seguras. -

-

- Nuestra sólida reputación se construye sobre la transparencia, integridad y un compromiso constante con la satisfacción del cliente. Más que ofrecerte simples servicios, te brindamos un acompañamiento profesional y cercano en cada etapa de tu viaje. -

-

- Deposita tu confianza en nosotros para recibir orientación experta. -

-
-
- Persona recibiendo unas llaves - -
-
- - ) -} diff --git a/src/components/NavBar/Icono.tsx b/src/components/NavBar/Icono.tsx deleted file mode 100644 index cbc5b12..0000000 --- a/src/components/NavBar/Icono.tsx +++ /dev/null @@ -1,15 +0,0 @@ -interface IconoProps { - icono: React.FC>; - titulo: string; -} - -const Icono: React.FC = ({ icono: IconComponent, titulo }) => { - return ( -
- -

{titulo}

-
- ) -} - -export default Icono diff --git a/src/components/NavBar/Icons.tsx b/src/components/NavBar/Icons.tsx deleted file mode 100644 index 7992ede..0000000 --- a/src/components/NavBar/Icons.tsx +++ /dev/null @@ -1,41 +0,0 @@ -export const HomeIcon = () => ( - - - -) - -export const AlquilarIcon = () => ( - - - -) - -export const ComprarIcon = () => ( - - - -) - -export const ContactoIcon = () => ( - - - -) - -export const FacebookIcon = () => ( - - - -) - -export const WhatsappIcon = () => ( - - - -) - -export const InstagramIcon = () => ( - - - -) diff --git a/src/components/NavBar/NavBar.tsx b/src/components/NavBar/NavBar.tsx deleted file mode 100644 index bdf5981..0000000 --- a/src/components/NavBar/NavBar.tsx +++ /dev/null @@ -1,39 +0,0 @@ -import Icono from './Icono' -import { AlquilarIcon, ComprarIcon, ContactoIcon, HomeIcon, FacebookIcon, WhatsappIcon, InstagramIcon } from './Icons' - -export default function NavBar () { - return ( -
-
- - - - -
-
-
-

Dirección

-

Teléfono

-
-
- - - -
-

Inmobiliaria

-
-
- ) -} diff --git a/src/context/AuthContext.tsx b/src/context/AuthContext.tsx index 61fd120..84f619a 100644 --- a/src/context/AuthContext.tsx +++ b/src/context/AuthContext.tsx @@ -13,7 +13,7 @@ interface AuthProviderProps { export const AuthContext = createContext(null) export const AuthProvider: React.FC = ({ children }) => { - const [isAuthenticated, setIsAuthenticated] = useState(false) + const [isAuthenticated, setIsAuthenticated] = useState(true) const login = () => { setIsAuthenticated(true) diff --git a/src/layouts/Layout.tsx b/src/layouts/Layout.tsx deleted file mode 100644 index c16ccbd..0000000 --- a/src/layouts/Layout.tsx +++ /dev/null @@ -1,27 +0,0 @@ -import { ReactNode, useState } from 'react' - -import './layout.css' - -import Header from '../components/Header/Header' -import NavBar from '../components/NavBar/NavBar' - -interface LayoutProps { - children: ReactNode; -} - -const Layout: React.FC = ({ children }) => { - const [open, setOpen] = useState(false) - - return ( -
-
- {children} - -
- ) -} - -export default Layout diff --git a/src/pages/AboutUs.tsx b/src/pages/AboutUs.tsx index 90fe77b..f7cb761 100644 --- a/src/pages/AboutUs.tsx +++ b/src/pages/AboutUs.tsx @@ -1,10 +1,7 @@ -import Layout from '../layouts/Layout' - export default function AboutUs () { return ( - -
Nosotros
-
+
Nosotros
+ ) } diff --git a/src/pages/Buying.tsx b/src/pages/Buying.tsx index 26e839e..6ba3007 100644 --- a/src/pages/Buying.tsx +++ b/src/pages/Buying.tsx @@ -1,10 +1,7 @@ -import Layout from '../layouts/Layout' - export default function Buying () { return ( - -
Comprar
-
+
Comprar
+ ) } diff --git a/src/pages/DetailPurchases.tsx b/src/pages/DetailPurchases.tsx index 222535c..36fdf96 100644 --- a/src/pages/DetailPurchases.tsx +++ b/src/pages/DetailPurchases.tsx @@ -1,11 +1,10 @@ import { useParams } from 'react-router-dom' -import Layout from '../layouts/Layout' export default function DetailPurchases () { const { id } = useParams() return ( - -
{id}
-
+ +
{id}
+ ) } diff --git a/src/pages/DetailRent.tsx b/src/pages/DetailRent.tsx index 20cd82c..09b334f 100644 --- a/src/pages/DetailRent.tsx +++ b/src/pages/DetailRent.tsx @@ -1,12 +1,10 @@ import { useParams } from 'react-router-dom' -import Layout from '../layouts/Layout' export default function DetailRent () { const { id } = useParams() return ( - -
{id}
-
+
{id}
+ ) } diff --git a/src/pages/Home.tsx b/src/pages/Home.tsx index 1d81936..65a359d 100644 --- a/src/pages/Home.tsx +++ b/src/pages/Home.tsx @@ -1,158 +1,5 @@ -import Layout from '../layouts/Layout' -import Carousel from '../components/Carousel/Carousel' -import InfoHome from '../components/MainBanner/MainBanner' -import InfoCards from '../components/InfoCards/InfoCards' -import AboutUs from '../components/AboutUs/AboutUs' - -const MiIconoAlquilerGrande = () => ( - - - - - - - - - - - - - - - - - -) - -const MiIconoAlquilerChico = () => ( - - - - - - - - - - - - - - - - - -) - -const MiIconoCompraGrande = () => ( - - - - - - - - - - - - - - - - - -) - -const MiIconoCompraChico = () => ( - - - - - - - - - - - - - - - - - -) - export default function Home () { return ( - - - -
- - - -
- -
+

Home

) } diff --git a/src/pages/Login.tsx b/src/pages/Login.tsx index 397146a..98d991c 100644 --- a/src/pages/Login.tsx +++ b/src/pages/Login.tsx @@ -1,10 +1,17 @@ -import Layout from '../layouts/Layout' +import React from 'react' +import FormLogReg from '../components/FormLogReg/FormLogReg' // Ajusta la ruta según sea necesario -export default function Login () { - return ( - +const Login: React.FC = () => { + const loginInputs = [ + { id: 'email', label: 'Email', placeholder: 'arcortoon@gmail.com', type: 'email' }, + { id: 'password', label: 'Contraseña', placeholder: '********', type: 'password' } + ] -
Login
-
+ return ( +
+ +
) } + +export default Login diff --git a/src/pages/NotFound.tsx b/src/pages/NotFound.tsx index 250dda9..b4d84b0 100644 --- a/src/pages/NotFound.tsx +++ b/src/pages/NotFound.tsx @@ -1,10 +1,5 @@ -import Layout from '../layouts/Layout' - export default function NotFound () { return ( - - -
NotFound
-
+
NotFound
) } diff --git a/src/pages/Register.tsx b/src/pages/Register.tsx new file mode 100644 index 0000000..60fdd8d --- /dev/null +++ b/src/pages/Register.tsx @@ -0,0 +1,18 @@ +import React from 'react' +import FormLogReg from '../components/FormLogReg/FormLogReg' // Ajusta la ruta según sea necesario + +const Register: React.FC = () => { + const registerInputs = [ + { id: 'nameSurname', label: 'Nombre y Apellido', placeholder: 'Nacho Basilio', type: 'text' }, + { id: 'email', label: 'Email', placeholder: 'arcortoon@gmail.com', type: 'email' }, + { id: 'password', label: 'Contraseña', placeholder: '********', type: 'password' } + ] + + return ( +
+ +
+ ) +} + +export default Register diff --git a/src/pages/ToRent.tsx b/src/pages/ToRent.tsx index d4b337b..42101b7 100644 --- a/src/pages/ToRent.tsx +++ b/src/pages/ToRent.tsx @@ -1,12 +1,5 @@ -import Layout from '../layouts/Layout' -import Carousel from '../components/Carousel/Carousel' -import CardProperty from '../components/CardProperty/CardProperty' - export default function ToRent () { return ( - - - - +

Alquiler

) } diff --git a/src/pages/User.tsx b/src/pages/User.tsx index 61d265b..a7f0116 100644 --- a/src/pages/User.tsx +++ b/src/pages/User.tsx @@ -1,10 +1,5 @@ -import Layout from '../layouts/Layout' - export default function User () { return ( - - -
Usuario
-
+
Usuario
) } diff --git a/src/routes/PrivateRoute.tsx b/src/routes/PrivateRoute.tsx index 7a8ca8b..91bcb18 100644 --- a/src/routes/PrivateRoute.tsx +++ b/src/routes/PrivateRoute.tsx @@ -1,5 +1,5 @@ import React, { useContext } from 'react' -import { Route, Navigate } from 'react-router-dom' +import { Navigate } from 'react-router-dom' import { AuthContext } from '../context/AuthContext' interface AuthContextType { @@ -15,13 +15,7 @@ interface PrivateRouteProps { const PrivateRoute: React.FC = ({ element }) => { const { isAuthenticated } = useContext(AuthContext) as AuthContextType - return isAuthenticated - ? ( - - ) - : ( - - ) + return isAuthenticated ? element : } export default PrivateRoute diff --git a/src/routes/Router.tsx b/src/routes/Router.tsx index 51aa424..6524204 100644 --- a/src/routes/Router.tsx +++ b/src/routes/Router.tsx @@ -9,6 +9,7 @@ import Buying from '../pages/Buying' import AboutUs from '../pages/AboutUs' import Login from '../pages/Login' import DetailPurchases from '../pages/DetailPurchases' +import Register from '../pages/Register' export default function Router () { return ( @@ -28,6 +29,8 @@ export default function Router () { } /> + } /> + } />} /> } />