Skip to content

[Medium]: Replace hash-based profile navigation with app state navigation #8

@AnirudhSinghRajora

Description

@AnirudhSinghRajora

Problem Statement

Profile action buttons currently use hash-based navigation. The app itself uses page state navigation, so behavior is inconsistent and harder to maintain.

Proposed Approach

Add a page navigation callback in App and pass it to UserProfile.
Replace hash-based button handlers with callback-based page switching.
Make Create Your First Event open create-event page.
Make Browse Events open event-list page.
Remove any active hash navigation usage related to these buttons.
Verify navigation works in authenticated flow.

Files and Scope

event-dappp/src/App.js
event-dappp/src/components/UserProfile.jsx

Acceptance Criteria

  • Create Your First Event button navigates through app state
  • Browse Events button navigates through app state
  • No active hash navigation is used for profile actions
  • Navigation works correctly after login

Test Plan

Open profile page after login.
Click Create Your First Event and confirm create-event page opens.
Click Browse Events and confirm event-list page opens.
Confirm URL hash is not used for these actions.

Risks and Edge Cases

Possible regression in page switching if callback is not passed correctly.
Must ensure behavior still works when user is not authenticated.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions