Here is the translation:
I have a basic problem but I don’t know why. I created a page and it doesn’t redirect to it even when I type it directly in the navigation bar. I have this navigation bar:
anexo imagen de como tengo organizado los archivos.
enter image description here
import React from "react"
import { Link } from 'gatsby';
import { StyledNavBar, ItemsWrapper } from "./navBar.styled"
import NavItem from "../../molecules/navigation/navItem/navItem"
import Navigation from "../../molecules/navigation/nav/navigation"
const NavBar = props => {
const { className } = props
return (
<StyledNavBar className={className}>
<Navigation>
<ItemsWrapper>
<NavItem url={`/`} iconName="apoya">
Inicio
</NavItem>
<NavItem url={`/noticias`} iconName="apoya">
NOTICIAS
</NavItem>
<NavItem url={`/home/Metodologia`} iconName="apoya">
<Link to="/home/Metodologia">Metodología</Link>
</NavItem>
<NavItem url={`/newsletter`} iconName="apoya">
NEWSLETTER
</NavItem>
<NavItem url={`https://www.instagram.com/p/CrLjF-nN_C1/`} iconName="apoya">
TIENDA
</NavItem>
<NavItem url={`https://www.ruedasrebeldes.com/quienes-somos/`} iconName="apoya">
Quiénes somos
</NavItem>
<NavItem url={`/examplePage`} iconName="apoya">
<Link to="/examplePage">Ejemplo</Link>
</NavItem>
</ItemsWrapper>
</Navigation>
</StyledNavBar>
)
}
NavBar.propTypes = {}
NavBar.defaultProps = {}
export default NavBar
y aun cuando cree el link de pagina de ejemplo o exaplePage que seria algo asi
even when i crate a link in the page as a example page calle “exaplePages” looks like this:
// src/pages/examplePage.jsx
import React from "react"
const ExamplePage = () => {
return (
<div>
<h1>Página de Ejemplo</h1>
<p>Esta es una página de ejemplo.</p>
</div>
)
}
export default ExamplePage
It’s still not working even when I search in the navigation bar for 9000/examplePage. What could be the issue?
related image
enter image description here
I tried changing names and moving files around, thinking I might have done something wrong with the metodologia page, which is the page I want to navigate to, but it still doesn’t work. That’s why I created a completely new and clean page as an example page.
Carlos Duque is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.