@@ -48,21 +48,14 @@ export const Sidebar: React.FC<SidebarProps> = ({
48
48
onSidebarToggle,
49
49
...props
50
50
} ) => {
51
- const history = useHistory ( ) ;
52
51
const state = useAppState ( ) ;
53
52
const actions = useActions ( ) ;
54
53
const [ activeAccount , setActiveAccount ] = useState < {
55
54
id : string ;
56
55
name : string ;
57
56
avatarUrl : string ;
58
57
} | null > ( null ) ;
59
- const {
60
- dashboard,
61
- activeTeam,
62
- activeTeamInfo,
63
- user,
64
- personalWorkspaceId,
65
- } = state ;
58
+ const { dashboard, activeTeam, activeTeamInfo, user } = state ;
66
59
67
60
React . useEffect ( ( ) => {
68
61
actions . dashboard . getAllFolders ( ) ;
@@ -72,7 +65,7 @@ export const Sidebar: React.FC<SidebarProps> = ({
72
65
if ( state . activeTeam ) {
73
66
const team = dashboard . teams . find ( ( { id } ) => id === state . activeTeam ) ;
74
67
if ( team ) {
75
- const isPersonalWorkspace = team . id === personalWorkspaceId ;
68
+ const isPersonalWorkspace = team . id === state . personalWorkspaceId ;
76
69
setActiveAccount ( {
77
70
id : team . id ,
78
71
name : team . name ,
@@ -159,8 +152,6 @@ export const Sidebar: React.FC<SidebarProps> = ({
159
152
actions . setActiveTeam ( {
160
153
id : workspace . id ,
161
154
} ) ;
162
-
163
- history . replace ( dashboardUrls . recent ( workspace . id ) ) ;
164
155
} }
165
156
activeAccount = { activeAccount }
166
157
/>
@@ -208,14 +199,12 @@ export const Sidebar: React.FC<SidebarProps> = ({
208
199
Repositories
209
200
</ Text >
210
201
</ Element >
211
- { activeTeam === personalWorkspaceId && (
212
- < RowItem
213
- name = "My contributions"
214
- page = "my-contributions"
215
- path = { dashboardUrls . myContributions ( activeTeam ) }
216
- icon = "contribution"
217
- />
218
- ) }
202
+ < RowItem
203
+ name = "My contributions"
204
+ page = "my-contributions"
205
+ path = { dashboardUrls . myContributions ( activeTeam ) }
206
+ icon = "contribution"
207
+ />
219
208
< RowItem
220
209
name = "All repositories"
221
210
page = "repositories"
0 commit comments