vercel / react-transition-progress

Show a progress bar while React Transitions run
https://react-transition-progress.vercel.app
MIT License
168 stars 17 forks source link

Add support for UrlObject #8

Closed korsvanloon closed 5 months ago

korsvanloon commented 6 months ago

The next/link object can have a regular object as href, but the react-transition-progress link calls toString on the href resulting in [Object object]. It needs the format function from the url library instead:

import { format } from "url";

const hrefString = typeof href === "string" ? href : format(href)
timneutkens commented 6 months ago

Feel free to send a PR.

korsvanloon commented 5 months ago

here you go :) added in an extra fix for scroll behaviour

korsvanloon commented 5 months ago

@timneutkens Could you please have a look at my PR? And trigger another release? The CMD+click fix would also be great to have released.