Skip to content

bar loads indefinitely when clicking on a link that redirects to current page #170

@claycoleman

Description

@claycoleman

Description

Similar to #158, but I've discovered it's related to nextjs redirects.

Our app has several redirects configured in our next.config.ts:

{
  source: "/",
  destination: "/home",
  permanent: false,
},
{
  source: "/docs",
  destination: "/docs/overview",
  permanent: false,
},

When I'm on the destination of one of these redirects (ie, /home) and click on a link to the source of the same redirect (in this case, /), the bar loads indefinitely. This ignores disableSameURL setting.

Context:

 <ProgressProvider
    height="3px"
    color="var(--primary-accent)"
    options={{ showSpinner: false }}
    shallowRouting
    // only show after 500ms to avoid flickering
    delay={500}
  >
    {children}
  </ProgressProvider>

Code example

No response

Package used (or docs)

@bprogress/next 3.2.12

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions