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`
1515 screenshotUrl
1616 screenshotOutdated
1717 viewCount
18+ likeCount
1819 isV2
1920 draft
2021 restricted
Original file line number Diff line number Diff line change @@ -28,10 +28,14 @@ export const getTeamSidebarData: Query<
2828 projects(syncData: false) {
2929 ...sidebarProjectFragment
3030 }
31+ sandboxes(limit: 10, orderBy: { field: "updatedAt", direction: DESC }) {
32+ ...sandboxFragmentDashboard
33+ }
3134 }
3235 }
3336 }
3437 ${ sidebarSyncedSandboxFragment }
3538 ${ sidebarTemplateFragment }
3639 ${ sidebarProjectFragment }
40+ ${ sandboxFragmentDashboard }
3741` ;
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ export const getSidebarData = async (
1515 const result = await queries . getTeamSidebarData ( { id : teamId } ) ;
1616
1717 const syncedSandboxes = result . me ?. team ?. syncedSandboxes || null ;
18+ const sandboxes = result . me ?. team ?. sandboxes || [ ] ;
1819 const templates = result . me ?. team ?. templates || null ;
1920 const repositories =
2021 result . me ?. team ?. projects ?. map ( p => ( {
@@ -29,6 +30,7 @@ export const getSidebarData = async (
2930 state . sidebar [ teamId ] = {
3031 hasSyncedSandboxes,
3132 hasTemplates,
33+ sandboxes,
3234 repositories,
3335 } ;
3436 } catch {
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ type SidebarState = {
55 hasSyncedSandboxes : boolean | null ;
66 hasTemplates : boolean | null ;
77 repositories : Array < RepoInfo > ;
8+ sandboxes : Array < Sandbox > ;
89} ;
910
1011export type State = Record < string , SidebarState > ;
You can’t perform that action at this time.
0 commit comments