1
1
import {
2
- USER_PROFILE_URL ,
3
2
ALL_APPLICATIONS_URL ,
4
3
DATASOURCE_URL ,
5
4
// FOLDER_URL,
@@ -11,7 +10,6 @@ import {
11
10
SETTING_URL ,
12
11
SUPPORT_URL ,
13
12
TRASH_URL ,
14
- NEWS_URL ,
15
13
ORG_HOME_URL ,
16
14
} from "constants/routesURL" ;
17
15
import { getUser , isFetchingUser } from "redux/selectors/usersSelectors" ;
@@ -45,7 +43,6 @@ import { QueryLibraryEditor } from "../queryLibrary/QueryLibraryEditor";
45
43
import { ProductLoading } from "components/ProductLoading" ;
46
44
import { Layout } from "../../components/layout/Layout" ;
47
45
import { HomeView } from "./HomeView" ;
48
- import { UserProfileView } from "./UserProfileView" ;
49
46
import { NewsView } from "./NewsView" ;
50
47
import { OrgView } from "./OrgView" ;
51
48
import styled , { css } from "styled-components" ;
@@ -213,34 +210,20 @@ export default function ApplicationHome() {
213
210
sections = { [
214
211
{
215
212
items : [
216
- {
217
- text : < TabLabel > { trans ( "home.profile" ) } </ TabLabel > ,
218
- routePath : USER_PROFILE_URL ,
219
- routeComp : UserProfileView ,
220
- icon : ( { selected, ...otherProps } ) => selected ? < UserIcon { ...otherProps } width = { "24px" } /> : < UserIcon { ...otherProps } width = { "24px" } /> ,
221
- } ,
222
- {
223
- text : < TabLabel > { trans ( "home.news" ) } </ TabLabel > ,
224
- routePath : NEWS_URL ,
225
- routeComp : NewsView ,
226
- icon : ( { selected, ...otherProps } ) => selected ? < NewsIcon { ...otherProps } width = { "24px" } /> : < NewsIcon { ...otherProps } width = { "24px" } /> ,
227
- visible : ( { user } ) => user . orgDev ,
228
- style : { color : "red" } ,
229
- } ,
230
213
{
231
214
text : < TabLabel > { trans ( "home.orgHome" ) } </ TabLabel > ,
232
215
routePath : ORG_HOME_URL ,
233
216
routePathExact : false ,
234
217
routeComp : OrgView ,
235
- icon : ( { selected, ...otherProps } ) => selected ? < WorkspacesIcon { ...otherProps } width = { "24px" } /> : < WorkspacesIcon { ...otherProps } width = { "24px" } /> ,
218
+ icon : ( { selected, ...otherProps } ) => selected ? < WorkspacesIcon { ...otherProps } width = { "24px" } /> : < WorkspacesIcon { ...otherProps } width = { "24px" } /> ,
236
219
visible : ( { user } ) => ! user . orgDev ,
237
220
} ,
238
221
{
239
222
text : < TabLabel > { trans ( "home.marketplace" ) } </ TabLabel > ,
240
223
routePath : MARKETPLACE_URL ,
241
224
routePathExact : false ,
242
225
routeComp : MarketplaceView ,
243
- icon : ( { selected, ...otherProps } ) => selected ? < MarketplaceIcon { ...otherProps } width = { "24px" } /> : < MarketplaceIcon { ...otherProps } width = { "24px" } /> ,
226
+ icon : ( { selected, ...otherProps } ) => selected ? < MarketplaceIcon { ...otherProps } width = { "24px" } /> : < MarketplaceIcon { ...otherProps } width = { "24px" } /> ,
244
227
} ,
245
228
]
246
229
} ,
@@ -251,33 +234,33 @@ export default function ApplicationHome() {
251
234
text : < MoreFoldersWrapper > { trans ( "home.allFolders" ) } </ MoreFoldersWrapper > ,
252
235
routePath : FOLDERS_URL ,
253
236
routeComp : RootFolderListView ,
254
- icon : ( { selected, ...otherProps } ) => selected ? < FolderIcon { ...otherProps } width = { "24px" } /> : < FolderIcon { ...otherProps } width = { "24px" } /> ,
237
+ icon : ( { selected, ...otherProps } ) => selected ? < FolderIcon { ...otherProps } width = { "24px" } /> : < FolderIcon { ...otherProps } width = { "24px" } /> ,
255
238
} ,
256
239
{
257
240
text : < TabLabel > { trans ( "home.allApplications" ) } </ TabLabel > ,
258
241
routePath : ALL_APPLICATIONS_URL ,
259
242
routeComp : HomeView ,
260
- icon : ( { selected, ...otherProps } ) => selected ? < AppsIcon { ...otherProps } width = { "24px" } /> : < AppsIcon { ...otherProps } width = { "24px" } /> ,
243
+ icon : ( { selected, ...otherProps } ) => selected ? < AppsIcon { ...otherProps } width = { "24px" } /> : < AppsIcon { ...otherProps } width = { "24px" } /> ,
261
244
} ,
262
245
] ,
263
246
} ,
264
-
247
+
265
248
{
266
249
items : [
267
-
250
+
268
251
{
269
252
text : < TabLabel > { trans ( "home.queryLibrary" ) } </ TabLabel > ,
270
253
routePath : QUERY_LIBRARY_URL ,
271
254
routeComp : QueryLibraryEditor ,
272
- icon : ( { selected, ...otherProps } ) => selected ? < HomeQueryLibraryIcon { ...otherProps } width = { "24px" } /> : < HomeQueryLibraryIcon { ...otherProps } width = { "24px" } /> ,
255
+ icon : ( { selected, ...otherProps } ) => selected ? < HomeQueryLibraryIcon { ...otherProps } width = { "24px" } /> : < HomeQueryLibraryIcon { ...otherProps } width = { "24px" } /> ,
273
256
visible : ( { user } ) => user . orgDev ,
274
257
} ,
275
258
{
276
259
text : < TabLabel > { trans ( "home.datasource" ) } </ TabLabel > ,
277
260
routePath : DATASOURCE_URL ,
278
261
routePathExact : false ,
279
262
routeComp : DatasourceHome ,
280
- icon : ( { selected, ...otherProps } ) => selected ? < HomeDataSourceIcon { ...otherProps } width = { "24px" } /> : < HomeDataSourceIcon { ...otherProps } width = { "24px" } /> ,
263
+ icon : ( { selected, ...otherProps } ) => selected ? < HomeDataSourceIcon { ...otherProps } width = { "24px" } /> : < HomeDataSourceIcon { ...otherProps } width = { "24px" } /> ,
281
264
visible : ( { user } ) => user . orgDev ,
282
265
onSelected : ( _ , currentPath ) => currentPath . split ( "/" ) [ 1 ] === "datasource" ,
283
266
} ,
@@ -290,7 +273,7 @@ export default function ApplicationHome() {
290
273
routePath : "/ee/6600ae8724a23f365ba2ed4c/admin" ,
291
274
routePathExact : false ,
292
275
routeComp : AppEditor ,
293
- icon : ( { selected, ...otherProps } ) => selected ? ( < EnterpriseIcon { ...otherProps } width = { "24px" } /> ) : ( < EnterpriseIcon { ...otherProps } width = { "24px" } /> ) ,
276
+ icon : ( { selected, ...otherProps } ) => selected ? ( < EnterpriseIcon { ...otherProps } width = { "24px" } /> ) : ( < EnterpriseIcon { ...otherProps } width = { "24px" } /> ) ,
294
277
visible : ( { user } ) => user . orgDev ,
295
278
} ,
296
279
] ,
@@ -315,7 +298,7 @@ export default function ApplicationHome() {
315
298
routePath : SETTING_URL ,
316
299
routePathExact : false ,
317
300
routeComp : Setting ,
318
- icon : ( { selected, ...otherProps } ) => selected ? < HomeSettingIcon { ...otherProps } width = { "24px" } /> : < HomeSettingIcon { ...otherProps } width = { "24px" } /> ,
301
+ icon : ( { selected, ...otherProps } ) => selected ? < HomeSettingIcon { ...otherProps } width = { "24px" } /> : < HomeSettingIcon { ...otherProps } width = { "24px" } /> ,
319
302
visible : ( { user } ) => user . orgDev ,
320
303
onSelected : ( _ , currentPath ) => currentPath . split ( "/" ) [ 1 ] === "setting" ,
321
304
}
@@ -328,7 +311,7 @@ export default function ApplicationHome() {
328
311
text : < TabLabel > { trans ( "home.trash" ) } </ TabLabel > ,
329
312
routePath : TRASH_URL ,
330
313
routeComp : TrashView ,
331
- icon : ( { selected, ...otherProps } ) => selected ? < RecyclerIcon { ...otherProps } width = { "24px" } /> : < RecyclerIcon { ...otherProps } width = { "24px" } /> ,
314
+ icon : ( { selected, ...otherProps } ) => selected ? < RecyclerIcon { ...otherProps } width = { "24px" } /> : < RecyclerIcon { ...otherProps } width = { "24px" } /> ,
332
315
visible : ( { user } ) => user . orgDev ,
333
316
} ,
334
317
] ,
0 commit comments