-
-
Notifications
You must be signed in to change notification settings - Fork 7
Feature: Migrating static data to Google Sheets #163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
👷 Deploy request for opentech pending review.Visit the deploys page to approve it
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR migrates the static event data to a dynamic source by fetching event data from a Google Sheets CSV, while also updating some of the navigation links.
- Migrated previous events to be fetched via event_api.list() in getStaticProps
- Updated styling of buttons and SVG sizes for improved layout
- Swapped GitHub and LinkedIn links on the homepage
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| pages/previous-events.js | Replaced static event import with dynamic data fetching via event_api.list(), and updated layout. |
| pages/index.js | Modified navigation links to swap GitHub and LinkedIn references and adjusted button texts accordingly. |
Comments suppressed due to low confidence (1)
pages/previous-events.js:5
- Consider adding error handling for event_api.list() in getStaticProps to manage potential fetch failures gracefully.
const events = await event_api.list();
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahí te dejé un comentario de mejorar, para el código propuesto.
Por lo demás, está genial tu propuesta. 💎
| if (!events) { | ||
| return <ErrorPage statusCode={404} />; | ||
| } | ||
| export async function getStaticProps() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Por aqui, te sugiero que agregues un manejo de errores. 🚀
Cambios realizados
Se migró la data de eventos anteriores que estaba definida estáticamente en el código a un archivo CSV alojado en Google Sheets para facilitar su actualización y mantenimiento colaborativo.
Link del google sheets
https://docs.google.com/spreadsheets/d/1A26dIHDKWy1mfSbkXpO_ZNRGywQTNaHb4uYKLzO0NBI/edit?usp=sharing
Este cambio permite mantener los datos del sitio actualizados de manera más dinámica y colaborativa, sin necesidad de modificar el código fuente directamente.