File tree Expand file tree Collapse file tree 4 files changed +8
-0
lines changed
packages/app/src/app/overmind Expand file tree Collapse file tree 4 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ export const sandboxFragmentDashboard = gql`
15
15
screenshotUrl
16
16
screenshotOutdated
17
17
viewCount
18
+ likeCount
18
19
isV2
19
20
draft
20
21
restricted
Original file line number Diff line number Diff line change @@ -28,10 +28,14 @@ export const getTeamSidebarData: Query<
28
28
projects(syncData: false) {
29
29
...sidebarProjectFragment
30
30
}
31
+ sandboxes(limit: 10, orderBy: { field: "updatedAt", direction: DESC }) {
32
+ ...sandboxFragmentDashboard
33
+ }
31
34
}
32
35
}
33
36
}
34
37
${ sidebarSyncedSandboxFragment }
35
38
${ sidebarTemplateFragment }
36
39
${ sidebarProjectFragment }
40
+ ${ sandboxFragmentDashboard }
37
41
` ;
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ export const getSidebarData = async (
15
15
const result = await queries . getTeamSidebarData ( { id : teamId } ) ;
16
16
17
17
const syncedSandboxes = result . me ?. team ?. syncedSandboxes || null ;
18
+ const sandboxes = result . me ?. team ?. sandboxes || [ ] ;
18
19
const templates = result . me ?. team ?. templates || null ;
19
20
const repositories =
20
21
result . me ?. team ?. projects ?. map ( p => ( {
@@ -29,6 +30,7 @@ export const getSidebarData = async (
29
30
state . sidebar [ teamId ] = {
30
31
hasSyncedSandboxes,
31
32
hasTemplates,
33
+ sandboxes,
32
34
repositories,
33
35
} ;
34
36
} catch {
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ type SidebarState = {
5
5
hasSyncedSandboxes : boolean | null ;
6
6
hasTemplates : boolean | null ;
7
7
repositories : Array < RepoInfo > ;
8
+ sandboxes : Array < Sandbox > ;
8
9
} ;
9
10
10
11
export type State = Record < string , SidebarState > ;
You can’t perform that action at this time.
0 commit comments