Filter users down using various options
searchQuery
will filter users by what their name start with.// Will return a list of users starting with 'al';
import { user } from '@cord-sdk/react';
const searchResults = useSearchUsers({ searchQuery: 'al', groupID: 'my-group-id'});
return (
<div>
{!searchResults && "Loading..."}
{searchResults &&
searchResults.users.map((user) => (
<div key={user.id}>
<p>User name: {user.name}</p>
</div>
))}
</div>
);
The API provides an object which has the following fields:
This is an array of objects, each of which has the following fields:
Show property details
users
which is a list of users in the group. This is a one time return.This is an object with the following fields:
Show property details
Not finding the answer you need? Ask our Developer Community