[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
2024-12-06 09:42:24 +01:00
committed by Claire
parent fb77bfb94d
commit a8f6ed9776
10 changed files with 242 additions and 237 deletions

View File

@@ -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`);