[Glitch] Convert <Directory> to Typescript / function component

Port 863c470a2b to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
Renaud Chaput authored and Claire committed 2024-06-30 17:33:23 +02:00
1 parent 1ac4e64a3b
commit 8160a655a5
9 files changed
+558 -509

No files matched your search

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