ppresume / community

Discussions, feedbacks, roadmaps, community.
57 stars 3 forks source link

bug: failed to generate PDF for resumes with names that contains non-latin chars #65

Closed xiaohanyu closed 2 weeks ago

xiaohanyu commented 2 weeks ago

Description

After we migrate to next.js app router, resumes with names that contains non-latin chars failed to generate PDF.

To Reproduce

Steps to reproduce the behavior:

  1. Go to /dashboard
  2. Click on resume that contains non-latin chars
  3. View that resume and try to generate PDF

https://github.com/ppresume/community/assets/1164623/06d4c78b-fa42-46ee-809b-0b927aa316cd

Actual Behavior

PDF generation failed

Expected Behavior

PDF generation should success

[Optional] Screenshots

Desktop

Smartphone

NA

Additional Context

The route cause for this issue is due to next.js app router migration.

Previous, we use const { slug } = useRouter().query, after migrate to app router, we use const { slug } = useParams<{ slug: string }>()!, the former value seems by default got decoded, while the later returns the raw value.

Our PDF generation handler need raw slug value in order to find correct resumes under the hood.

xiaohanyu commented 2 weeks ago

fixed.