#doesn't work: url escaping example in the doc

1 messages · Page 1 of 1 (latest)

slow night
#

in reports.$id.jsx is the Link:

<Link to='pdf' reloadDocument>PDF</Link>

Clicking this link makes browser goes to something like /reports/1289/pdf always...

Which leads to reports.$id[.]pdf.jsx is never reached.

#

@ebon ibex mind take a look at this? guess it's easy for you veterans

ebon ibex
#

When you use a relative link (no leading /) it always appends with /.

#

So you need to write the full path for the link to.

#

For example

#

const location = useLocation();

#

Link to={location.pathname + ".pdf"}

slow night
#

thx!

exotic smelt