Describe the bug
The /editor route is protected by middleware, but there is a UI/UX issue:
- Unauthenticated users may briefly see the editor UI before being redirected, or
- The navbar does not accurately reflect the user's authentication state (e.g., showing "Start editing" when not logged in).
To Reproduce
Steps to reproduce the behavior:
- Log out of the application.
- Navigate to
/editor directly or via client-side navigation.
Expected behavior
- Unauthenticated users should be immediately redirected to
/login without seeing the editor UI.
- The navbar should always show "Login" for unauthenticated users and "Start editing" for authenticated users.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: [e.g. Fedora 40]
- Browser: [e.g. Chrome, Firefox]
- Version: [e.g. Chrome 124, Firefox 115]
Additional context
This issue is about improving the user experience and security by adding client-side checks and updating the navbar logic.