Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

have router navigate to expected route on page loads #721

Closed
david-kalmakoff opened this issue Nov 2, 2024 · 1 comment · Fixed by #723
Closed

have router navigate to expected route on page loads #721

david-kalmakoff opened this issue Nov 2, 2024 · 1 comment · Fixed by #723
Labels
a:bug Something isn't working in:ui

Comments

@david-kalmakoff
Copy link
Contributor

Is your feature request related to a problem? Please describe.
If you are on a page other than the home page and refresh, you are brought back to the homepage.
If you paste in a url such as https://<domain>/#/plugins it brings you to the home page instead of that page.
It seems that the router navigates the /login then / on any page loads.

Describe the solution you'd like
It would be great if the router brought you to the expected page on page loads.
I would have to look some more into how the router is implemented to find a more specific solution.

Additional context
This is something I would be happy to dive into if others find value in it.

@david-kalmakoff david-kalmakoff added the a:feature New feature or request label Nov 2, 2024
@jmattheis
Copy link
Member

Yeah, feel free to fix this, I see this as a bug.

It's likely that we only have to set authenticating = true, when calling tryAuthenticate in https://github.com/gotify/server/blob/master/ui/src/CurrentUser.ts#L101 (and this.authenticating = false when it's finished) as the Layout.tsx has this as first route

{authenticating ? (
    <Route path="/">
        <LoadingSpinner />
    </Route>
) : null}

@jmattheis jmattheis added a:bug Something isn't working and removed a:feature New feature or request labels Nov 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:bug Something isn't working in:ui
Development

Successfully merging a pull request may close this issue.

3 participants