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

This commit is contained in:
Renaud Chaput authored and GitHub committed 2024-06-26 18:04:50 +00:00
1 parent 51f581e03e
commit 863c470a2b
8 files changed
+553 -494

No files matched your search

+15
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,
});