More work on pl-api migration
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
@ -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>>({
|
||||
|
||||
Reference in New Issue
Block a user