-
Notifications
You must be signed in to change notification settings - Fork 30
feat(frontend): added Protection to Frontend #32
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
feat(frontend): added Protection to Frontend #32
Conversation
✅ Deploy Preview for ydo-bsoc ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Proof that changes are correctScreen.Recording.2025-07-04.183758.mp4 |
|
@Zapper9982 is it okay. |
|
Can u share the demo after login too ? |
Screen.Recording.2025-07-05.110504.mp4@Zapper9982 i added navbar in home to show you |
|
@SHREESHANTH99 the expected behaviour is that the navbar be served on all routes except the landing and Login. adding the Navbar component to each route is not a feasible option . |
|
@Zapper9982 should I make it such that it should be available it all other routes automatically except landing and login |
yes exactly |
|
done should i sent video |
Screen.Recording.2025-07-05.130846.mp4 |
|
@SHREESHANTH99 can u resolve the merge conflicts |
|
@SHREESHANTH99 fix the build please |
|
Resolve the conflicts as well |
|
Is it okay now |
src/App.jsx
Outdated
|
|
||
| <Route path="/callback" element={<Callback />} /> | ||
| <Route path="/preloader" element={<Preloader />} /> | ||
| <Route path="/profile" element={<ProfilePage />} /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't the other endpoints have protection too ? Please add the private route components to others too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only profile and home page right I will add protection to profile too then
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only profile and home page right I will add protection to profile too then
we need protection for every route that will come apart from Home and Login can u implement it like that ? , cause just adding the PrivaterRoute around each route one by one , is redundant and is not production ready .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
Navbar be served on all routes except landing and login. Closes bsoc-bitbyte#25
created a profile page which is editable using react usestate with /profile route Closes bsoc-bitbyte#18
- Increase branch and year input box widths for better usability - Fix layout shifts when switching between view and edit modes - Ensure consistent font styling across input elements Closes bsoc-bitbyte#18
- Increase branch and year input box widths for better usability - Fix layout shifts when switching between view and edit modes - Ensure consistent font styling across input elements Closes bsoc-bitbyte#18
made a few changes in the width of the branchinput and year boxes Closes bsoc-bitbyte#18
fixed the position of the x button Fixes bsoc-bitbyte#18
Made changes according to requirement. Closes bsoc-bitbyte#25
Made changes according to requirement. Closes bsoc-bitbyte#25
* feat: added the preloader * feat: preloader background updated * feat: preloader fixed bg and svg Signed-off-by: Shirshendu R Tripathi <shirsh8924@gmail.com> * feat: preloader fixed bg and svg Signed-off-by: Shirshendu R Tripathi <shirsh8924@gmail.com> * feat: fixed the backgrounds and comments Signed-off-by: Shirshendu R Tripathi <shirsh8924@gmail.com> --------- Signed-off-by: Shirshendu R Tripathi <shirsh8924@gmail.com>
…o requirement. Closes bsoc-bitbyte#25
05f9582 to
7bcc66a
Compare
|
@SHREESHANTH99 resolve all the conflicts and looks like all the checks have failed . |
|
@SHREESHANTH99 can you explain why have u force pushed ? |
I forgot to merge and sync changes from main before doing commit so I was getting merge conflicts |
Made changes according to requirement. Closes bsoc-bitbyte#25
>> >> Made changes according to requirement. >> >> Closes bsoc-bitbyte#25
Resolved merge conflicts. Closes bsoc-bitbyte#25
cf76bc0 to
849070d
Compare
|
@Zapper9982 i am getting this [Lint Commit Messages again again again what should i do? |
Protected all routes except Landing, Login, and Callback by wrapping routing logic with a central PrivateRoutesWrapper. closes bsoc-bitbyte#25
dont worry about it , one of your commit messages were not correctly listed , apart from that its okay dont worry |
I made changes of what you asked can you review |
src/App.jsx
Outdated
| </Route> | ||
| <Route path="/callback" element={<Callback />} /> | ||
| </Route> | ||
| <Route path="/preloader" element={<Preloader />} /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add the preloaded into the private routes too since , the Login content exactly loads before the preloader starts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OTHER than that looks good
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you review
…b.com/SHREESHANTH99/YDO into feature/protected-routes
Added protection to preloder. closes bsoc-bitbyte#25
Overview
This PR fixes part of [Feature Request]: Add Route Protection to Frontend #25.
This PR does the following:
Adds a reusable component to protect sensitive routes like /home and /profile.
Redirects unauthenticated users to /login.
Renders only inside protected pages (e.g., Home.jsx), cannot be rendered before login is done
##Essential Checklist
The PR title starts with Fix part of #25: followed by a clear summary.
"Allow edits from maintainers" is checked.
The PR is made from a branch not called main or master.
Proof that changes are correct
Uploading Screen Recording 2025-07-04 183758.mp4…