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

146
Views
Cómo obtener datos de la hoja de Google en la próxima aplicación

Estoy probando la hoja de Google como una mini base de datos con la aplicación nextJs, pero cómo usar getStaticPaths para obtener datos de página específicos. en esta aplicación no estoy usando la API de hoja de Google, estoy obteniendo datos como JSON.

 export const getStaticPaths = async () => { const res = await fetch('https://docs.google.com/spreadsheets/d/1OgT7pYpT__3y1qgC6Nlb8dE759drBFTSWN3H0g5M_Ps/gviz/tq?tqx=out:json') const text = await res.text(); const data = await JSON.parse(text.substr(47).slice(0, -2)); const paths = data.table.rows.map((table) => { return { params: { title: table.c[1].v } } }) return { paths, fallback: false } } export const getStaticProps = async (context) => { const title = context.params.title; const res = await fetch('https://docs.google.com/spreadsheets/d/1OgT7pYpT__3y1qgC6Nlb8dE759drBFTSWN3H0g5M_Ps/gviz/tq?tqx=out:json') const text = await res.text(); const data = await JSON.parse(text.substr(47).slice(0, -2)); return { props: { posts: data } } } const Title = ({ posts }) => { return ( <> <div> <h1>{ posts.table.rows[0].c[0].v }</h1> </div> </> ) } export default Title;

cómo obtener datos en la página dinámica de la hoja de google.

about 4 years ago · Juan Pablo Isaza
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!