Commit 5ddd4557 authored by tom's avatar tom

hide network type select from menu if there is only one type

parent 3b97aceb
...@@ -45,10 +45,12 @@ const NetworkMenuContentMobile = ({ items, tabs }: Props) => { ...@@ -45,10 +45,12 @@ const NetworkMenuContentMobile = ({ items, tabs }: Props) => {
</> </>
) : ( ) : (
<> <>
<Select size="xs" borderRadius="base" value={ selectedTab } onChange={ handleSelectChange } focusBorderColor="none"> { tabs.length > 1 && (
{ tabs.map((tab) => <option key={ tab } value={ tab }>{ capitalize(tab) }</option>) } <Select size="xs" borderRadius="base" value={ selectedTab } onChange={ handleSelectChange } focusBorderColor="none" mb={ 6 }>
</Select> { tabs.map((tab) => <option key={ tab } value={ tab }>{ capitalize(tab) }</option>) }
<VStack as="ul" spacing={ 2 } alignItems="stretch" mt={ 6 }> </Select>
) }
<VStack as="ul" spacing={ 2 } alignItems="stretch">
{ items { items
.filter(({ group }) => group === selectedTab) .filter(({ group }) => group === selectedTab)
.map((network) => ( .map((network) => (
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment