pl-fe: migrate /api/v*/instance to tanstack query
Signed-off-by: mkljczk <git@mkljczk.pl>
This commit is contained in:
@@ -2,9 +2,9 @@ import React from 'react';
|
||||
import { FormattedMessage, defineMessages, useIntl } from 'react-intl';
|
||||
import { useHistory } from 'react-router-dom';
|
||||
|
||||
import { useInstance } from 'pl-fe/api/hooks/instance/use-instance';
|
||||
import Text from 'pl-fe/components/ui/text';
|
||||
import Widget from 'pl-fe/components/ui/widget';
|
||||
import { useInstance } from 'pl-fe/hooks/use-instance';
|
||||
import { usePlFeConfig } from 'pl-fe/hooks/use-pl-fe-config';
|
||||
|
||||
import SiteWallet from './site-wallet';
|
||||
@@ -20,7 +20,7 @@ interface ICryptoDonatePanel {
|
||||
const CryptoDonatePanel: React.FC<ICryptoDonatePanel> = ({ limit = 3 }): JSX.Element | null => {
|
||||
const intl = useIntl();
|
||||
const history = useHistory();
|
||||
const instance = useInstance();
|
||||
const { data: instance } = useInstance();
|
||||
|
||||
const addresses = usePlFeConfig().cryptoAddresses;
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import React, { useState } from 'react';
|
||||
import { defineMessages, useIntl, FormattedMessage } from 'react-intl';
|
||||
|
||||
import { useInstance } from 'pl-fe/api/hooks/instance/use-instance';
|
||||
import Accordion from 'pl-fe/components/ui/accordion';
|
||||
import Column from 'pl-fe/components/ui/column';
|
||||
import Stack from 'pl-fe/components/ui/stack';
|
||||
import { useInstance } from 'pl-fe/hooks/use-instance';
|
||||
|
||||
import SiteWallet from './components/site-wallet';
|
||||
|
||||
@@ -14,7 +14,7 @@ const messages = defineMessages({
|
||||
|
||||
const CryptoDonate: React.FC = (): JSX.Element => {
|
||||
const intl = useIntl();
|
||||
const instance = useInstance();
|
||||
const { data: instance } = useInstance();
|
||||
|
||||
const [explanationBoxExpanded, toggleExplanationBox] = useState(true);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user