@@ -40,10 +40,6 @@ Tab.propTypes = {
40
40
41
41
// It is good for right now, because we need to separate the nav dropdown logic from the navBar before we can use it here
42
42
const FilterOptions = styled ( Options ) `
43
- &.hidden {
44
- display: none;
45
- }
46
-
47
43
> div > button:focus + ul,
48
44
> div > ul > button:focus ~ div > ul {
49
45
transform: scale(1);
@@ -80,51 +76,54 @@ const DashboardTabSwitcher = ({ currentTab, isOwner, username }) => {
80
76
) }
81
77
</ div >
82
78
< MediaQuery maxWidth = { 770 } >
83
- { ( mobile ) => (
84
- < FilterOptions className = { mobile ? 'visible' : 'hidden' } >
85
- < div >
86
- < IconButton icon = { FilterIcon } />
87
- < ul >
88
- < li >
89
- < button
90
- onClick = { ( ) => dispatch ( toggleDirectionForField ( 'name' ) ) }
91
- >
92
- { t ( 'CollectionList.HeaderName' ) }
93
- </ button >
94
- </ li >
95
- < li >
96
- < button
97
- onClick = { ( ) =>
98
- dispatch ( toggleDirectionForField ( 'createdAt' ) )
99
- }
100
- >
101
- { t ( 'CollectionList.HeaderCreatedAt' ) }
102
- </ button >
103
- </ li >
104
- < li >
105
- < button
106
- onClick = { ( ) =>
107
- dispatch ( toggleDirectionForField ( 'updatedAt' ) )
108
- }
109
- >
110
- { t ( 'CollectionList.HeaderUpdatedAt' ) }
111
- </ button >
112
- </ li >
113
- { currentTab === TabKey . collections && (
79
+ { ( mobile ) =>
80
+ mobile &&
81
+ currentTab !== TabKey . assets && (
82
+ < FilterOptions >
83
+ < div >
84
+ < IconButton icon = { FilterIcon } />
85
+ < ul >
86
+ < li >
87
+ < button
88
+ onClick = { ( ) => dispatch ( toggleDirectionForField ( 'name' ) ) }
89
+ >
90
+ { t ( 'CollectionList.HeaderName' ) }
91
+ </ button >
92
+ </ li >
114
93
< li >
115
94
< button
116
95
onClick = { ( ) =>
117
- dispatch ( toggleDirectionForField ( 'numItems ' ) )
96
+ dispatch ( toggleDirectionForField ( 'createdAt ' ) )
118
97
}
119
98
>
120
- # of sketches
99
+ { t ( 'CollectionList.HeaderCreatedAt' ) }
121
100
</ button >
122
101
</ li >
123
- ) }
124
- </ ul >
125
- </ div >
126
- </ FilterOptions >
127
- ) }
102
+ < li >
103
+ < button
104
+ onClick = { ( ) =>
105
+ dispatch ( toggleDirectionForField ( 'updatedAt' ) )
106
+ }
107
+ >
108
+ { t ( 'CollectionList.HeaderUpdatedAt' ) }
109
+ </ button >
110
+ </ li >
111
+ { currentTab === TabKey . collections && (
112
+ < li >
113
+ < button
114
+ onClick = { ( ) =>
115
+ dispatch ( toggleDirectionForField ( 'numItems' ) )
116
+ }
117
+ >
118
+ # of sketches
119
+ </ button >
120
+ </ li >
121
+ ) }
122
+ </ ul >
123
+ </ div >
124
+ </ FilterOptions >
125
+ )
126
+ }
128
127
</ MediaQuery >
129
128
</ ul >
130
129
) ;
0 commit comments