From e618d7ca33fd9eb2cc0a296c6b488563cc8d2e89 Mon Sep 17 00:00:00 2001 From: Sam Date: Tue, 16 Jan 2024 12:04:41 +0200 Subject: [PATCH] Change text for first load --- src/components/txHistory/index.tsx | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/components/txHistory/index.tsx b/src/components/txHistory/index.tsx index 4482b289..17282a31 100644 --- a/src/components/txHistory/index.tsx +++ b/src/components/txHistory/index.tsx @@ -56,13 +56,13 @@ type TxHistoryLayoutProps = { addresses: string[] } -const supportedNetowrks = [ 'subsocial' ] +const supportedNetowrks = ['subsocial'] const TxHistoryLayout = ({ addresses }: TxHistoryLayoutProps) => { // const [ networks, setNetworks ] = useState([ 'all' ]) - const [ events, setEvents ] = useState([ 'all' ]) + const [events, setEvents] = useState(['all']) const address = addresses[0] - const [ refresh, setRefresh ] = useState(false) + const [refresh, setRefresh] = useState(false) const { isMobile } = useResponsiveSize() const historySection = useRef(null) @@ -85,14 +85,17 @@ const TxHistoryLayout = ({ addresses }: TxHistoryLayoutProps) => { ) } - const dataLoading = isEmptyArray(initialData.txs) && !initialData.actualData const List = useCallback(() => { return (
loadMore({ address, @@ -183,7 +186,7 @@ type LastUpdateProps = { } const LastUpdate = ({ lastUpdateDate, refresh }: LastUpdateProps) => { - const [ lastUpdate, setLastUpdate ] = useState(null) + const [lastUpdate, setLastUpdate] = useState(null) useEffect(() => { if (!lastUpdateDate) return @@ -195,7 +198,7 @@ const LastUpdate = ({ lastUpdateDate, refresh }: LastUpdateProps) => { return () => { clearInterval(intervalId) } - }, [ lastUpdateDate?.getTime() ]) + }, [lastUpdateDate?.getTime()]) return (