From 7790b7e062426ba0ed4eb8548245447364a85cb6 Mon Sep 17 00:00:00 2001 From: Tyler Shipe Date: Tue, 17 Aug 2021 16:51:02 -0400 Subject: [PATCH] run yarn format --- hooks/useMarket.tsx | 4 +++- hooks/useMarketList.tsx | 9 +++++---- hooks/useSortableData.tsx | 5 ++++- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/hooks/useMarket.tsx b/hooks/useMarket.tsx index cfb8a630..0f2b0b38 100644 --- a/hooks/useMarket.tsx +++ b/hooks/useMarket.tsx @@ -15,7 +15,9 @@ export const formatTokenMints = (symbols: { [name: string]: string }) => { const useMarket = () => { const market = useMangoStore((state) => state.selectedMarket.current) - const selectedMarketName = useMangoStore((state) => state.selectedMarket.config.name) + const selectedMarketName = useMangoStore( + (state) => state.selectedMarket.config.name + ) const { programId } = useConnection() const marketAddress = useMemo( diff --git a/hooks/useMarketList.tsx b/hooks/useMarketList.tsx index 42993378..391e9416 100644 --- a/hooks/useMarketList.tsx +++ b/hooks/useMarketList.tsx @@ -11,10 +11,11 @@ const useMarketList = () => { const { cluster, programId, dexProgramId } = useConnection() const spotMarkets = useMemo( - () => config.spotMarkets.reduce((acc, market) => { - acc[market.name] = market.publicKey.toBase58() - return acc; - }, {}) || {}, + () => + config.spotMarkets.reduce((acc, market) => { + acc[market.name] = market.publicKey.toBase58() + return acc + }, {}) || {}, [cluster, mangoGroupName] ) diff --git a/hooks/useSortableData.tsx b/hooks/useSortableData.tsx index 80d1ab7f..4c9be86f 100644 --- a/hooks/useSortableData.tsx +++ b/hooks/useSortableData.tsx @@ -1,6 +1,9 @@ import { useMemo, useState } from 'react' -export function useSortableData(items: T[], config = null): { items: T[], requestSort: any, sortConfig: any } { +export function useSortableData( + items: T[], + config = null +): { items: T[]; requestSort: any; sortConfig: any } { const [sortConfig, setSortConfig] = useState(config) const sortedItems = useMemo(() => {