File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed
packages/app/src/app/overmind/namespaces/dashboard Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,14 @@ export const setActiveTeam: Action<{
3939} > = ( { state, effects } , { id } ) => {
4040 state . dashboard . activeTeam = id ;
4141 effects . browser . storage . set ( TEAM_ID_LOCAL_STORAGE , id ) ;
42+ state . dashboard . sandboxes = {
43+ ...state . dashboard . sandboxes ,
44+ DRAFTS : null ,
45+ TEMPLATES : null ,
46+ RECENT : null ,
47+ SEARCH : null ,
48+ ALL : null ,
49+ } ;
4250} ;
4351
4452export const dragChanged : Action < { isDragging : boolean } > = (
@@ -129,15 +137,21 @@ export const getRecentSandboxes: AsyncAction = withLoadApp(
129137 const { dashboard } = state ;
130138 try {
131139 const data = await effects . gql . queries . recentSandboxes ( {
132- limit : 50 ,
140+ limit : 200 ,
133141 orderField : dashboard . orderBy . field ,
134142 orderDirection : dashboard . orderBy . order . toUpperCase ( ) as Direction ,
135143 } ) ;
136144 if ( ! data || ! data . me ) {
137145 return ;
138146 }
139147
140- dashboard . sandboxes [ sandboxesTypes . RECENT ] = data . me . sandboxes ;
148+ dashboard . sandboxes [ sandboxesTypes . RECENT ] = data . me . sandboxes
149+ . filter (
150+ sandbox =>
151+ ( sandbox . collection || { collection : { } } ) . teamId ===
152+ state . dashboard . activeTeam
153+ )
154+ . slice ( 0 , 50 ) ;
141155 } catch ( error ) {
142156 effects . notificationToast . error (
143157 'There was a problem getting your recent Sandboxes'
You can’t perform that action at this time.
0 commit comments