Skip to content

Commit 595b11f

Browse files
jyash97CompuIves
authored andcommitted
fix: filter options for deleted sandboxes (codesandbox#2640)
1 parent 36dd5f0 commit 595b11f

File tree

1 file changed

+2
-4
lines changed
  • packages/app/src/app/pages/Dashboard/Content/routes/DeletedSandboxes

1 file changed

+2
-4
lines changed

packages/app/src/app/pages/Dashboard/Content/routes/DeletedSandboxes/index.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import React from 'react';
22
import { Observer } from 'app/componentConnectors';
33
import Helmet from 'react-helmet';
4-
import { uniq } from 'lodash-es';
54
import { Query } from 'react-apollo';
65
import RemoveIcon from 'react-icons/lib/md/highlight-remove';
76

87
import { Content as Sandboxes } from '../../Sandboxes';
98

109
import { DELETED_SANDBOXES_CONTENT_QUERY } from '../../../queries';
10+
import { getPossibleTemplates } from '../../Sandboxes/utils';
1111

1212
const DeletedSandboxes = () => (
1313
<>
@@ -29,9 +29,7 @@ const DeletedSandboxes = () => (
2929
? []
3030
: (data && data.me && data.me.sandboxes) || [];
3131

32-
const possibleTemplates = uniq(
33-
sandboxes.map(x => x.source.template)
34-
);
32+
const possibleTemplates = getPossibleTemplates(sandboxes);
3533

3634
const orderedSandboxes = store.dashboard.getFilteredSandboxes(
3735
sandboxes

0 commit comments

Comments
 (0)