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.
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:
/dashboard
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 useconst { 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.