feat: Implement client-side page navigation#10
feat: Implement client-side page navigation#10dhanaraj02 wants to merge 5 commits intoDevSyncx:mainfrom
Conversation
|
Hey please solve these conflicts !! |
|
@Annanyatiwary4 its created by some other contributor who made the 404 not found page. |
|
i will checkout and resolve this issue. |
|
hey @Annanyatiwary4 , i hope i resolved the issue this time. |
|
share the screenshots of the changes you made !! |
|
@Annanyatiwary4 :Here is a short description of the changes I made I refactored the frontend of the DevSync application to create a multi-page user interface. The original single-page design, which displayed all components on one page, was converted into a multi-page application using The key changes include:
|
|
please don’t change the overall design of the website. Keep the existing design exactly as it is, and just convert the sections into separate pages as needed. Let me know if anything’s unclear! |





Issue 1
Description
This Pull Request introduces client-side multi-page navigation to the DevSync frontend, allowing users to navigate between the Home, Features, and About Us sections as distinct pages. This enhances the user experience by providing a more structured and organized content flow, moving away from a single-page application with scroll-based sections.
Changes Implemented
frontend/src/App.jsx:useStatehook to manage thecurrentPagestate, controlling which main content component is rendered.renderPagefunction to conditionally displayHero(withAdStrip),FeaturesSection, orAboutbased on thecurrentPagestate.idattributes from the main content sections as navigation is now handled via state.handlePageChangefunction as a prop to theNavbarcomponent.frontend/src/Components/Navbar/Navbar.jsx:navItemsto use apageproperty for internal navigation and retainlinkfor external URLs (like GitHub).<button>element for internal pages, triggering theonPageChangeprop.floatingNavItemsto correctly passonClickhandlers to theFloatingNavcomponent for internal navigation.frontend/src/Components/ui/floating-navbar.tsx(or.jsxif converted):NavIteminterface (or object structure in JSX) to include an optionalonClickproperty.<button>element when anonClickhandler is present in anavItem, otherwise defaulting to an<a>tag forlink-based navigation. This ensures proper click handling for internal routes within the floating navbar.Benefits