1 import { fetchCommunities } from "@utils/app";
2 import { hostname } from "@utils/helpers";
3 import { CommunityTribute } from "@utils/types";
5 export default async function communitySearch(
7 ): Promise<CommunityTribute[]> {
8 const communitiesResponse = await fetchCommunities(text);
10 return communitiesResponse.map(cv => ({
11 key: `!${cv.community.name}@${hostname(cv.community.actor_id)}`,