delete desktop specific code

This commit is contained in:
Maximilian Schneider 2022-01-08 21:14:22 -08:00
parent 007393ae5b
commit 04e332602b
1 changed files with 0 additions and 60 deletions

View File

@ -1,8 +1,6 @@
import { useTranslation } from 'next-i18next'
import { useEffect, useState } from 'react'
import { EyeIcon, EyeOffIcon } from '@heroicons/react/outline'
import { ChevronRightIcon } from '@heroicons/react/solid'
import useLocalStorageState from '../hooks/useLocalStorageState'
import useMangoGroupConfig from '../hooks/useMangoGroupConfig'
import useMangoStore from '../stores/useMangoStore'
import Link from 'next/link'
@ -25,12 +23,6 @@ const SelectMarket = () => {
const mangoCache = useMangoStore((s) => s.selectedMangoGroup.cache)
const [markets, setMarkets] = useState([])
const [hiddenMarkets, setHiddenMarkets] = useLocalStorageState(
'hiddenMarkets',
[]
)
useEffect(() => {
const markets = []
const allMarkets = [...groupConfig.spotMarkets, ...groupConfig.perpMarkets]
@ -46,35 +38,10 @@ const SelectMarket = () => {
setMarkets(markets)
}, [])
const handleHideShowMarket = (asset) => {
if (hiddenMarkets.includes(asset)) {
setHiddenMarkets(hiddenMarkets.filter((m) => m !== asset))
} else {
setHiddenMarkets(hiddenMarkets.concat(asset))
}
}
return (
<div>
<div className="flex items-end justify-between pb-3 pt-2">
<div className="font-bold text-lg text-th-fgd-1">{t('markets')}</div>
{/*hiddenMarkets.length === 0 ? (
<LinkButton
className="font-normal hidden md:block mb-0.5 text-th-fgd-3 text-xs disabled:cursor-not-allowed disabled:no-underline disabled:text-th-fgd-4"
onClick={() =>
setHiddenMarkets(markets.map((mkt) => mkt.baseAsset))
}
>
{t('hide-all')}
</LinkButton>
) : (
<LinkButton
className="font-normal hidden md:block mb-0.5 text-th-fgd-3 text-xs disabled:cursor-not-allowed disabled:no-underline disabled:text-th-fgd-4"
onClick={() => setHiddenMarkets([])}
>
{t('show-all')}
</LinkButton>
)*/}
</div>
{markets.map((mkt) => (
<div key={mkt.baseAsset}>
@ -87,34 +54,7 @@ const SelectMarket = () => {
/>
<span className="text-th-fgd-2">{mkt.baseAsset}</span>
</div>
<div className="hidden md:flex">
{hiddenMarkets.includes(mkt.baseAsset) ? (
<EyeOffIcon
className="cursor-pointer default-transition h-4 text-th-fgd-4 w-4 hover:text-th-fgd-3"
onClick={() => handleHideShowMarket(mkt.baseAsset)}
/>
) : (
<EyeIcon
className="cursor-pointer default-transition h-4 text-th-primary w-4 hover:text-th-primary-dark"
onClick={() => handleHideShowMarket(mkt.baseAsset)}
/>
)}
</div>
</div>
{/* <div className="bg-[rgba(255,255,255,0.1)] flex items-center justify-between px-2.5 py-0.5 text-th-fgd-3">
<StyledColumnHeader>Markets</StyledColumnHeader>
<div className="flex justify-between">
<StyledColumnHeader className="pr-5 text-right w-20">
Price
</StyledColumnHeader>
<StyledColumnHeader className="text-right w-20">
24h Change
</StyledColumnHeader>
<StyledColumnHeader className="text-right w-20">
24h Vol
</StyledColumnHeader>
</div>
</div> */}
<div className="divide-y divide-th-bkg-4">
{mangoGroup
? mkt.markets.map((m) => (