Skip to content

fix bug in protected routes components #507

fix bug in protected routes components

fix bug in protected routes components #507

Triggered via pull request December 10, 2024 10:13
Status Failure
Total duration 34s
Artifacts

build-and-lint-on-pr.yaml

on: pull_request
Fit to window
Zoom out
Zoom in

Annotations

2 errors and 2 warnings
build
Process completed with exit code 1.
build
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
build: src/components/ProtectedRoute.tsx#L18
The 'fetchUserProfile' function makes the dependencies of useEffect Hook (at line 47) change on every render. Move it inside the useEffect callback. Alternatively, wrap the definition of 'fetchUserProfile' in its own useCallback() Hook