feat: improve tournament workflows and prune outdated docs
This commit is contained in:
1 parent
da7b502936
commit
38a89b5374
53 files changed
+3308
-3276
No files matched your search
@@ -72,6 +72,10 @@ interface MatchesQueryOptions {
|
||||
sort?: 'asc' | 'desc';
|
||||
}
|
||||
|
||||
interface MatchesPageQueryOptions extends MatchesQueryOptions {
|
||||
includeResults?: boolean;
|
||||
}
|
||||
|
||||
export interface UserHistoryFilters {
|
||||
queueGroup?: RiotQueueGroup;
|
||||
rank?: RiotRankFilter;
|
||||
@@ -89,7 +93,7 @@ export interface CommunityInternalStatsFilters {
|
||||
|
||||
function createMatchesPath(
|
||||
communityId: string,
|
||||
options: MatchesQueryOptions = {},
|
||||
options: MatchesPageQueryOptions = {},
|
||||
) {
|
||||
const searchParams = new URLSearchParams();
|
||||
if (options.status) searchParams.set('status', options.status);
|
||||
@@ -100,6 +104,7 @@ function createMatchesPath(
|
||||
searchParams.set('scheduledFrom', options.scheduledFrom);
|
||||
if (options.scheduledTo) searchParams.set('scheduledTo', options.scheduledTo);
|
||||
if (options.sort) searchParams.set('sort', options.sort);
|
||||
if (options.includeResults) searchParams.set('includeResults', 'true');
|
||||
|
||||
const queryString = searchParams.toString();
|
||||
return `/communities/${communityId}/matches${queryString ? `?${queryString}` : ''}`;
|
||||
@@ -183,7 +188,7 @@ export function useMatches(
|
||||
}
|
||||
|
||||
export function useMatchesPage(
|
||||
options: MatchesQueryOptions,
|
||||
options: MatchesPageQueryOptions,
|
||||
communityId = DEFAULT_COMMUNITY_ID,
|
||||
) {
|
||||
const authScope = useOptionalAuthQueryScope();
|
||||
@@ -200,6 +205,7 @@ export function useMatchesPage(
|
||||
options.scheduledFrom ?? null,
|
||||
options.scheduledTo ?? null,
|
||||
options.sort ?? null,
|
||||
options.includeResults ?? false,
|
||||
],
|
||||
queryFn: () =>
|
||||
authScope.fetch<MatchListResponse>(
|
||||
|
||||
Reference in new issue
Block a user