Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

PDF Download crashes silently when page is refreshed

Closed Beginner friendly
#271 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
typescript
Domain
frontend

Research direction

Start with src/lib/exportToPDF.ts and src/components/cards/ViewTimeTable.tsx, then trace how the active timetable is represented by selectedData and how exportToPDF() receives its data. Make the PDF reflect the timetable being viewed and handle export errors with an alert. Done when refreshing /slots still allows downloading the viewed timetable, and failures show an alert.

Written by the indexing model from the issue text.

Description

When a user refreshes the /slots page and clicks the green "Download" button, nothing happens. It throws an unhandled error in the console (No course data available to export) because selected courses are only kept in temporary RAM (globalCourses), which resets on reload. Also, the download currently exports all loaded subjects rather than the specific timetable the student is viewing.
What needs to be done:

  • Derive the PDF export from the active timetable (selectedData) or keep course data in localStorage.
  • Wrap exportToPDF() in a try/catch inside ViewTimeTable.tsx and show an alert if it fails.
    Files:
  • src/lib/exportToPDF.ts
  • src/components/cards/ViewTimeTable.tsx
Dominant language
TypeScript
Stars
6
Forks
37
Avg merge
14h 30m
Merged PRs (30d)
38

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from CodeChefVIT/ffcs

All issues in CodeChefVIT/ffcs

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.