More work on pl-api migration

Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
marcin mikołajczak
2024-08-06 23:19:00 +02:00
parent 32c68a9221
commit 0fc8a2993f
53 changed files with 119 additions and 183 deletions

View File

@ -2,9 +2,8 @@ import { useQuery } from '@tanstack/react-query';
import { fetchTrendsSuccess } from 'soapbox/actions/trends';
import { useAppDispatch, useClient } from 'soapbox/hooks';
import { normalizeTag } from 'soapbox/normalizers';
import type { Tag } from 'soapbox/types/entities';
import type { Tag } from 'pl-api';
const useTrends = () => {
const dispatch = useAppDispatch();
@ -15,8 +14,7 @@ const useTrends = () => {
dispatch(fetchTrendsSuccess(data));
const normalizedData = data.map((tag) => normalizeTag(tag));
return normalizedData;
return data;
};
const result = useQuery<ReadonlyArray<Tag>>({