mirror of
https://github.com/Qortal/q-trade.git
synced 2025-06-20 13:11:21 +00:00
add missing dep in usememo
This commit is contained in:
parent
722338d3ea
commit
ae733da906
@ -1,4 +1,4 @@
|
||||
import React, { useEffect, useMemo, useState } from "react";
|
||||
import React, { useCallback, useEffect, useMemo, useState } from "react";
|
||||
import ReactGA from "react-ga4";
|
||||
import "./App.css";
|
||||
import socketService from "./services/socketService";
|
||||
@ -256,7 +256,7 @@ function App() {
|
||||
};
|
||||
}, [userInfo?.address]);
|
||||
|
||||
const getCoinLabel = (coin?: string)=> {
|
||||
const getCoinLabel = useCallback((coin?: string)=> {
|
||||
switch(coin || selectedCoin){
|
||||
case "LITECOIN":{
|
||||
|
||||
@ -285,7 +285,7 @@ function App() {
|
||||
default:
|
||||
return null
|
||||
}
|
||||
}
|
||||
}, [selectedCoin])
|
||||
|
||||
const gameContextValue: IContextProps = {
|
||||
userInfo,
|
||||
|
@ -218,7 +218,7 @@ export const TradeOffers: React.FC<any> = ({ foreignCoinBalance }: any) => {
|
||||
},
|
||||
},
|
||||
];
|
||||
}, [qortalNames]);
|
||||
}, [qortalNames, getCoinLabel]);
|
||||
|
||||
// const onRowClicked = (event: any) => {
|
||||
// if(listOfOngoingTradesAts.includes(event.data.qortalAtAddress)) return
|
||||
|
@ -136,7 +136,7 @@ export default function HistoryList({ qortAddress, historyList }) {
|
||||
},
|
||||
];
|
||||
|
||||
}, [selectedCoin, qortalNames])
|
||||
}, [selectedCoin, qortalNames, getCoinLabel])
|
||||
|
||||
|
||||
|
||||
|
@ -101,7 +101,7 @@ export default function TradeBotList({ qortAddress, failedTradeBots }) {
|
||||
resizable: true,
|
||||
},
|
||||
];
|
||||
}, [selectedCoin]);
|
||||
}, [selectedCoin, getCoinLabel]);
|
||||
useEffect(() => {
|
||||
if (qortAddress) {
|
||||
qortAddressRef.current = qortAddress;
|
||||
|
Loading…
x
Reference in New Issue
Block a user