|
@@ -3,6 +3,8 @@ import {
|
3
|
3
|
USER_ROLE
|
4
|
4
|
} from '../action-creator.sync.js'
|
5
|
5
|
|
|
6
|
+const handleRouteFromApi = route => route.startsWith('/#') ? route.slice(2) : route
|
|
7
|
+
|
6
|
8
|
export function workspaceList (state = [], action) {
|
7
|
9
|
switch (action.type) {
|
8
|
10
|
case `Update/${WORKSPACE_LIST}`:
|
|
@@ -13,7 +15,7 @@ export function workspaceList (state = [], action) {
|
13
|
15
|
description: ws.description,
|
14
|
16
|
sidebarEntry: ws.sidebar_entries.map(sbe => ({
|
15
|
17
|
slug: sbe.slug,
|
16
|
|
- route: sbe.route,
|
|
18
|
+ route: handleRouteFromApi(sbe.route),
|
17
|
19
|
faIcon: sbe.fa_icon,
|
18
|
20
|
hexcolor: sbe.hexcolor,
|
19
|
21
|
label: sbe.label
|