Function ProfileRoutes

  • Render the current user's profile screen.

    Resolves the profile operation from the spec and renders the configured profileComponents.view or profileComponents.edit component, wrapping it with data fetching and submit handling. Only /profile/me and /profile/me/edit are valid; any other /:username redirects to /me. The view operation is a GET; edit uses PUT/PATCH.

    Notes:

    • Renders nothing when no matching operation or component is configured.
    • Must be inside an AppProvider and a router.

    Returns null | Element

    <Route path="/profile/*" element={<ProfileRoutes />} />