Skip to content

Commit

Permalink
more logs
Browse files Browse the repository at this point in the history
  • Loading branch information
Zain-ul-din committed Mar 13, 2024
1 parent 18350ad commit 689b134
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/pages/timetable/[id].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export async function getStaticPaths() {
console.log('going to fetch timetable[id]');
const { data } = await axios.get(APIS_ENDPOINTS.TIMETABLE_PATHS);
console.log('GOT', JSON.stringify(data), ' ', decrypt<string[]>(data));
const paths = decrypt<string[]>(data).map((path) => ({ params: { id: path } }));
const paths = decrypt<string[]>(data).map((id) => ({ params: { id } }));
return {
paths,
fallback: true // can also be true or 'blocking'
Expand All @@ -36,6 +36,7 @@ export async function getStaticPaths() {

export async function getStaticProps(context: GetStaticPropsContext) {
const id = context.params!.id;
console.log('Gotcha ', id);
const { data } = await axios.get(`${APIS_ENDPOINTS.TIMETABLE}${id}.json`);
const timetable = decrypt(data);

Expand Down

0 comments on commit 689b134

Please sign in to comment.