Example

When a user clicks on the user profile avatar at the post creator area, UIKit will open User profile page.

However, you can intercept the event and define your own logic following the example below.

Usage

Let’s say you want to override the default logic and open your own modal showing the user profile instead of navigating to the user profile page.

function openUserProfileModal(userId) {
  ...
}

function MyApp() {
  return (
    <AmityUiKitProvider
      actionHandlers={{
        onClickUser: userId => openUserProfileModal(userId),
      }}
    >
      ...
    </AmityUiKitProvider>
  );
}

Last updated