Skip to content

Commit aea223a

Browse files
authored
frontend part of team sandboxes search (codesandbox#4022)
1 parent d2cd45c commit aea223a

File tree

1 file changed

+9
-4
lines changed
  • packages/app/src/app/overmind/namespaces/dashboard

1 file changed

+9
-4
lines changed

packages/app/src/app/overmind/namespaces/dashboard/actions.ts

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -687,11 +687,16 @@ export const getSearchSandboxes: AsyncAction<string | null> = withLoadApp(
687687
lastSandboxes = sandboxes;
688688
}
689689

690-
dashboard.sandboxes[
691-
sandboxesTypes.SEARCH
692-
] = state.dashboard
690+
const sandboxesToShow = state.dashboard
693691
.getFilteredSandboxes(searchIndex.search(search))
694-
.filter(x => !x.customTemplate);
692+
.filter(x => !x.customTemplate)
693+
.filter(
694+
sandbox =>
695+
(sandbox.collection || { collection: {} }).teamId ===
696+
state.dashboard.activeTeam
697+
);
698+
699+
dashboard.sandboxes[sandboxesTypes.SEARCH] = sandboxesToShow;
695700
} catch (error) {
696701
effects.notificationToast.error(
697702
'There was a problem getting your Sandboxes'

0 commit comments

Comments
 (0)