Skip to content

UseEffect Redirects #68

@saheeen-jey

Description

@saheeen-jey

If you are logged out and you attempt to go to https://tracker.hackthehill.com/walk-in, you will be redirected to the homepage after a second using a useEffect hook. Example: ..\track-the-hack\src\pages\hackers\index.tsx

Image

This is bad coding practice as the user should simply be not authorized to view this page, similarly to how logged in hackers cannot use the sign in form. This should be handled server side instead of on the client.

Image

Instead of having these client side redirect, try to implement server side redirects in the example shown above and anywhere else seen in the tracker.

For more information:

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions