HandleEditClick

Function: handleEditClick()

[object Object]

Defined in: app/components/Activity/ActivityTile/ActivityTile.handlers.tsx:27

Event handler to navigate a user to the edit page of a specific activity.

This function explicitly calls e.preventDefault() and e.stopPropagation(). This is essential for scenarios where an "Edit" button is nested inside a clickable Activity Card or list item, as it prevents the parent's click handler from being triggered.

Parameters

e

[object Object]

The click event object from the React component.

[object Object]

The navigation function from react-router (usually from useNavigate).

activity

ActivityResponseDto

The activity object containing the unique identifier for the route.

Returns

[object Object]

Example

const navigate = useNavigate();
// ...
<button onClick={(e) => handleEditClick(e, navigate, activity)}>
{t("edit")}
</button>

On this page