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

185
Vistas
React App pages working fine except those pulled from javascript object
import './css/App.css';
import 'bootstrap/dist/css/bootstrap.min.css';
import { useEffect, useState } from 'react';
import { BrowserRouter as Router, Routes, Route } from "react-router-dom";
import { Aboutpage, data, Home, BackToTopButton, Partenariat, Navigationbar, Footer, Newspage } from './components/Common'
function App() {

    const [landingPageData, setLandingPageData] = useState({});
    useEffect(() => {
        setLandingPageData(data);

    }, []);
    return (
        <div className="App">
            <Router>
                <Navigationbar data={landingPageData.navbar} />

                <Routes >

                    <Route exact path='/' element={<Home />} />
                    <Route path='/Partenariat' element={<Partenariat />} />
                    <Route path='/Aboutpage' element={<Aboutpage />} />
                    {data ? data.news.map((d, i) => (
                        <Route key={i} path={d.path} element={<Newspage img={d.image} title={d.title} subtitle={d.subtitle} fullarticle={d.fullarticle} date={d.date} author={d.author} />} />
                    )) : "loading..."}

                </Routes>
                <Footer />
                <BackToTopButton />

            </Router>
        </div>
    );
}

export default App;

The idea was to pull any new articles from the JS object and map each to it's own page.

This is working fine locally but when deployed to netlify the pages pulled from the javascript object are inaccessible Everyone else seems to have an issue with the home page. I would very much appreciate any help with this

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

0

By adding The _redirects file to the public folder with the following settings, It worked just fine /* /index.html 200

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