[Glitch] Refactor <HashtagHeader> to TypeScript

Port 25387dc423 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
Eugen Rochko authored and Claire committed 2024-12-25 21:21:38 +01:00
1 parent fb77bfb94d
commit a8f6ed9776
10 files changed
+242 -237

No files matched your search

@@ -0,0 +1,11 @@
import { apiRequestPost, apiRequestGet } from 'flavours/glitch/api';
import type { ApiHashtagJSON } from 'flavours/glitch/api_types/tags';
export const apiGetTag = (tagId: string) =>
apiRequestGet<ApiHashtagJSON>(`v1/tags/${tagId}`);
export const apiFollowTag = (tagId: string) =>
apiRequestPost<ApiHashtagJSON>(`v1/tags/${tagId}/follow`);
export const apiUnfollowTag = (tagId: string) =>
apiRequestPost<ApiHashtagJSON>(`v1/tags/${tagId}/unfollow`);