Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

95
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!