# User Profile Page (2.2)

There are two views for the user profile page.

## 1. User's own profile

This view allows the user to see his own user profile detail and his own user feed, there are two  state user can see.

**Default state** : Allows user to see his own following user counter and Follower user counter.

<figure><img src="https://2352509137-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MX0mOAVWkotGme0iRzu%2Fuploads%2FryXgdf9REwsfYOrsa0Lu%2FScreenshot%202566-02-22%20at%2006.19.01.png?alt=media&#x26;token=1d23ae2f-8ce8-4cb7-b23e-8cfaabde3bdb" alt=""><figcaption></figcaption></figure>

**Request pending state** : Allows user to see his own following user counter, Follower user counter, and also the follow request he received.

<figure><img src="https://2352509137-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MX0mOAVWkotGme0iRzu%2Fuploads%2FTiYXwHYT6SFrJvD50XQs%2FScreenshot%202566-02-22%20at%2006.20.28.png?alt=media&#x26;token=ce1a6a0b-1a80-4801-853b-2a96789a9349" alt=""><figcaption></figcaption></figure>

| Feature                        | Description                                                                                                                                                                                                                                              |
| ------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Follower counter               | Shows the total count of followers. It will redirect to [Following / Follower user list page](https://docs.social.plus/social-plus-uikit/uikit-3/ios/community/components/following-follower-user-list-page) when clicked.                               |
| Following counter              | Shows the total count of users that you're following. It will redirect to [Following / Follower user list page](https://docs.social.plus/social-plus-uikit/uikit-3/ios/community/components/following-follower-user-list-page) when clicked.             |
| Pending follow request section | If you have pending follow requests from other users, you will see the pending request section. It will redirect to [Follow request page](https://docs.social.plus/social-plus-uikit/uikit-3/ios/community/components/follow-request-page) when clicked. |
| Edit user profile              | It will redirect to [User profile edit page](https://docs.social.plus/social-plus-uikit/uikit-3/ios/community/components/user-profile-edit) when clicked.                                                                                                |

### Components

* [User feed (2.2)](https://docs.social.plus/social-plus-uikit/uikit-3/ios/community/components/user-profile-page-2.2/user-feed-2.2)

You can get this view by using this code:

```swift
let userProfileViewController = AmityUserProfilePageViewController.make(withUserId: "userId")
```

## 2. Other user's profile

This view allows the user to see other user's profile detail and their user feed. There are two states user can see

In the other user view , UIKIT has two main views that support the Follow user connection and the User privacy view.

**Default state** : Allows user to see the connection between the current user and the target user profile.

### If the current user is NOT connected to the viewing user and Private setting is Public

![Follow button shows if user is not yet connect with the viewing user ](https://2352509137-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MX0mOAVWkotGme0iRzu%2F-Mcwk64hWfrmL3VQa9VC%2F-Mcy7GKmkkFZwYympaJW%2Fimage.png?alt=media\&token=84cf538c-5544-4916-a611-3668ff87d119)

### If the current user is connected to the viewing user and Private setting is Public

![Follow button will not show if User is already connected](https://2352509137-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MX0mOAVWkotGme0iRzu%2F-Mcwk64hWfrmL3VQa9VC%2F-Mcy9WLHANMVcu5ZmZPS%2Fimage.png?alt=media\&token=38bfa431-7d58-40bc-9957-4849b38128f1)

### If the current user is NOT connected to the viewing user and Private setting is Private

![User feed is not shown since the current user is not connect and private setting is private.](https://2352509137-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MX0mOAVWkotGme0iRzu%2F-Mcwk64hWfrmL3VQa9VC%2F-McyBUJfsl0GfRgg5P_P%2Fimage.png?alt=media\&token=e154d79e-4a42-490c-8221-f7321261d96d)

### If the current user has send request to the viewing user and Private setting is Private

![Cancel request is shown if user has pending request and waiting for the request to be accept](https://2352509137-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MX0mOAVWkotGme0iRzu%2F-Mcwk64hWfrmL3VQa9VC%2F-McyC5CvyWWy2WwlIANe%2Fimage.png?alt=media\&token=e29aaaa3-7dfc-4fe3-981f-9a0e808d3092)

| Feature                        | Description                                                                                                                                                                                                                                              |
| ------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Follow button                  | <p>When clicked, the system will make a connection with the User.</p><p>If the Connection method = with request, system will change to cancel pending state.</p>                                                                                         |
| Cancel request button          | When clicked, follow request will be canceled.                                                                                                                                                                                                           |
| Follower counter               | Shows the total count of followers. It will redirect to [Following / Follower user list page](https://docs.social.plus/social-plus-uikit/uikit-3/ios/community/components/following-follower-user-list-page) when clicked.                               |
| Following counter              | Shows the total count of users that you're following. It will redirect to to [Following / Follower user list page](https://docs.social.plus/social-plus-uikit/uikit-3/ios/community/components/following-follower-user-list-page) when clicked.          |
| Pending follow request section | If you have pending follow requests from other users, you will see the pending request section. It will redirect to [Follow request page](https://docs.social.plus/social-plus-uikit/uikit-3/ios/community/components/follow-request-page) when clicked. |
| Edit user profile              | It will redirect to [User profile page](https://docs.social.plus/social-plus-uikit/uikit-3/ios/community/components/user-profile-page) when clicked.                                                                                                     |
| User feed (Private view)       | If a connection was not established, the user profile and the Private setting is Private.                                                                                                                                                                |

### Components

* [User feed (2.2)](https://docs.social.plus/social-plus-uikit/uikit-3/ios/community/components/user-profile-page-2.2/user-feed-2.2)

You can get this view by using this code:

```swift
let userProfileViewController = AmityUserProfilePageViewController.make(withUserId: "userId")
```
