0
0
Fork 0

Convert <Directory> to Typescript / function component (#30829)

This commit is contained in:
Renaud Chaput 2024-06-26 20:04:50 +02:00 committed by GitHub
parent 51f581e03e
commit 863c470a2b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 553 additions and 494 deletions

View file

@ -0,0 +1,15 @@
import { apiRequestGet } from 'mastodon/api';
import type { ApiAccountJSON } from 'mastodon/api_types/accounts';
export const apiGetDirectory = (
params: {
order: string;
local: boolean;
offset?: number;
},
limit = 20,
) =>
apiRequestGet<ApiAccountJSON[]>('v1/directory', {
...params,
limit,
});