feat: allow admins to add match participants
This commit is contained in:
1 parent
8aff1be225
commit
24983aeb09
11 files changed
+1019
-19
No files matched your search
@@ -13,6 +13,7 @@ import type {
|
||||
ApiAuctionHistoryEntry,
|
||||
ApiChampionStatsResponse,
|
||||
ApiCommunity,
|
||||
ApiCommunityUserSearchCandidate,
|
||||
ApiEnqueueRefreshResult,
|
||||
ApiInternalMatchDetailResponse,
|
||||
ApiInternalMatchListResponse,
|
||||
@@ -162,6 +163,25 @@ export function useMatch(matchId: string | undefined, communityId = DEFAULT_COMM
|
||||
});
|
||||
}
|
||||
|
||||
export function useCommunityUserSearch(
|
||||
query: string,
|
||||
communityId = DEFAULT_COMMUNITY_ID,
|
||||
enabled = true,
|
||||
) {
|
||||
return useQuery({
|
||||
queryKey: ['community-user-search', communityId, query],
|
||||
queryFn: () => {
|
||||
const searchParams = new URLSearchParams();
|
||||
searchParams.set('query', query);
|
||||
searchParams.set('limit', '10');
|
||||
return apiFetch<ApiCommunityUserSearchCandidate[]>(
|
||||
`/communities/${communityId}/users/search?${searchParams.toString()}`,
|
||||
);
|
||||
},
|
||||
enabled: Boolean(communityId && enabled && query.trim().length >= 2),
|
||||
});
|
||||
}
|
||||
|
||||
export function useAuction(
|
||||
matchId: string | undefined,
|
||||
communityId = DEFAULT_COMMUNITY_ID,
|
||||
|
||||
@@ -103,6 +103,24 @@ export interface ApiUser {
|
||||
updatedAt: string;
|
||||
}
|
||||
|
||||
export interface ApiCommunityUserSearchRiotAccount {
|
||||
puuid: string;
|
||||
gameName: string;
|
||||
tagLine: string;
|
||||
profileIconId: number;
|
||||
isPrimary: boolean;
|
||||
tiers: ApiTierInfo[];
|
||||
}
|
||||
|
||||
export interface ApiCommunityUserSearchCandidate {
|
||||
userId: string;
|
||||
kakaoTalkNickname?: string;
|
||||
isActivated: boolean;
|
||||
preferredPositions: ApiPositionPreference[];
|
||||
matchedRiotPuuid?: string;
|
||||
riotAccounts: ApiCommunityUserSearchRiotAccount[];
|
||||
}
|
||||
|
||||
export interface ApiCommunity {
|
||||
_id: string;
|
||||
name: string;
|
||||
|
||||
Reference in new issue
Block a user