Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

100
Vistas
image doesn't render react

First of all I want to apologize for this dumb question, I'm a real beginner in webdev.

I'm trying to make a component of a clickable image that redirect us to another page of the website. I doesn't get any error but the image does not display (I have a ? on my webpage) and when I click on this "?" I'm not redirected at all.

Here is my component (in src/components/LinkPicture.js)

import { Link } from 'react-router-dom';

export default function LinkPicture(link, imgSrc) {
    return(
        <Link to={link}>
            <img src={imgSrc} />
        </Link>
    )
}

And here is my page component (in src/pages/intraje/Home.js, the image in src/assets/logo_SEIO_color_head.png)

import React from 'react'
import LinkPicture from '../../components/LinkPicture';
import logo from "../../assets/logo_SEIO_color_head.png"


const Home = () => {
    return (
        <div className='home'>
            <React.Fragment>
                <h1>Home</h1>
                <LinkPicture link={"intraje/profile"} imgSrc={logo}> </LinkPicture>
            </React.Fragment>
        </div>

    )
}

export default Home;

What are my errors ? thanks by advance :)

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

import { Link } from 'react-router-dom';

export default function LinkPicture({link, imgSrc}) { // modification here
    return(
        <Link to={link}>
            <img src={imgSrc} />
        </Link>
    )
}

now your props are passed.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda