Class: FriendsPage

FriendsPage()

FriendsPage - A React functional component for displaying and managing friends, followers, and following. It offers features for viewing profiles, adding or removing friends, following or unfollowing users, and searching for new friends.

Constructor

new FriendsPage()

Source:

Methods

(static) MainList() → {React.Component}

Renders the main list of friends, followers, or following based on the selected type. Allows users to manage their social connections.
Source:
Returns:
A component representing the main list in the FriendsPage.
Type
React.Component

(static) handleFollowOrUnfollow(userId, isFollowing)

Decides whether to follow or unfollow a user based on the current state.
Parameters:
Name Type Description
userId string The unique ID of the user to follow or unfollow.
isFollowing boolean Indicates whether the current user is already following the target user.
Source:

(static) handlebtn1(uid)

Handles actions for the first button in the table. This could be either following a user or viewing a user's profile.
Parameters:
Name Type Description
uid string The unique ID of the user for which the action is to be taken.
Source:

(static) handlebtn2(uid)

Handles actions for the second button in the table. This could be removing a friend, unfollowing a user, or removing a follower.
Parameters:
Name Type Description
uid string The unique ID of the user for which the action is to be taken.
Source:

(static) removeFollower(uid)

Removes a follower from the current user's followers list.
Parameters:
Name Type Description
uid string The unique ID of the user to be removed from followers.
Source:

(static) tableContent() → {React.Component}

Generates the table content based on the current type (Friends, Following, or Followers).
Source:
Returns:
Table rows with user data and action buttons.
Type
React.Component

(static) toggleDrawer()

Toggles the side drawer open and close state.
Source:

(static) viewUser(uid)

Navigates to the profile page of a specified user.
Parameters:
Name Type Description
uid string The unique ID of the user whose profile is to be viewed.
Source: