pl-fe: migrate /api/v*/instance to tanstack query

Signed-off-by: mkljczk <git@mkljczk.pl>
This commit is contained in:
mkljczk
2024-12-03 15:03:17 +01:00
parent 2086e027ad
commit 1f8b79f309
79 changed files with 240 additions and 337 deletions

View File

@ -4,6 +4,7 @@ import { Link, useHistory } from 'react-router-dom';
import { mentionCompose } from 'pl-fe/actions/compose';
import { reblog, favourite, unreblog, unfavourite } from 'pl-fe/actions/interactions';
import { useInstance } from 'pl-fe/api/hooks/instance/use-instance';
import HoverAccountWrapper from 'pl-fe/components/hover-account-wrapper';
import Icon from 'pl-fe/components/icon';
import RelativeTimestamp from 'pl-fe/components/relative-timestamp';
@ -16,7 +17,6 @@ import Emojify from 'pl-fe/features/emoji/emojify';
import { HotKeys } from 'pl-fe/features/ui/components/hotkeys';
import { useAppDispatch } from 'pl-fe/hooks/use-app-dispatch';
import { useAppSelector } from 'pl-fe/hooks/use-app-selector';
import { useInstance } from 'pl-fe/hooks/use-instance';
import { useLoggedIn } from 'pl-fe/hooks/use-logged-in';
import { makeGetNotification } from 'pl-fe/selectors';
import { useModalsStore } from 'pl-fe/stores/modals';
@ -212,7 +212,7 @@ const Notification: React.FC<INotification> = (props) => {
const history = useHistory();
const intl = useIntl();
const instance = useInstance();
const { data: instance } = useInstance();
const type = notification.type;
const { accounts } = notification;