Skip to content

Commit 4519d0e

Browse files
committed
translations and conditional rendring of collection filter
1 parent 2c56207 commit 4519d0e

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

client/modules/User/components/DashboardTabSwitcher.jsx

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ const DashboardTabSwitcher = ({ currentTab, isOwner, username }) => {
8989
<button
9090
onClick={() => dispatch(toggleDirectionForField('name'))}
9191
>
92-
Name
92+
{t('CollectionList.HeaderName')}
9393
</button>
9494
</li>
9595
<li>
@@ -98,7 +98,7 @@ const DashboardTabSwitcher = ({ currentTab, isOwner, username }) => {
9898
dispatch(toggleDirectionForField('createdAt'))
9999
}
100100
>
101-
Created
101+
{t('CollectionList.HeaderCreatedAt')}
102102
</button>
103103
</li>
104104
<li>
@@ -107,18 +107,20 @@ const DashboardTabSwitcher = ({ currentTab, isOwner, username }) => {
107107
dispatch(toggleDirectionForField('updatedAt'))
108108
}
109109
>
110-
Updated
111-
</button>
112-
</li>
113-
<li>
114-
<button
115-
onClick={() =>
116-
dispatch(toggleDirectionForField('numItems'))
117-
}
118-
>
119-
# of sketches
110+
{t('CollectionList.HeaderUpdatedAt')}
120111
</button>
121112
</li>
113+
{currentTab === TabKey.collections && (
114+
<li>
115+
<button
116+
onClick={() =>
117+
dispatch(toggleDirectionForField('numItems'))
118+
}
119+
>
120+
# of sketches
121+
</button>
122+
</li>
123+
)}
122124
</ul>
123125
</div>
124126
</FilterOptions>

0 commit comments

Comments
 (0)