Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export const sandboxFragmentDashboard = gql`
screenshotUrl
screenshotOutdated
viewCount
likeCount
isV2
draft
restricted
Expand Down
4 changes: 4 additions & 0 deletions packages/app/src/app/overmind/effects/gql/sidebar/queries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,14 @@ export const getTeamSidebarData: Query<
projects(syncData: false) {
...sidebarProjectFragment
}
sandboxes(limit: 10, orderBy: { field: "updatedAt", direction: DESC }) {
...sandboxFragmentDashboard
}
}
}
}
${sidebarSyncedSandboxFragment}
${sidebarTemplateFragment}
${sidebarProjectFragment}
${sandboxFragmentDashboard}
`;
2 changes: 2 additions & 0 deletions packages/app/src/app/overmind/namespaces/sidebar/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export const getSidebarData = async (
const result = await queries.getTeamSidebarData({ id: teamId });

const syncedSandboxes = result.me?.team?.syncedSandboxes || null;
const sandboxes = result.me?.team?.sandboxes || [];
const templates = result.me?.team?.templates || null;
const repositories =
result.me?.team?.projects?.map(p => ({
Expand All @@ -29,6 +30,7 @@ export const getSidebarData = async (
state.sidebar[teamId] = {
hasSyncedSandboxes,
hasTemplates,
sandboxes,
repositories,
};
} catch {
Expand Down
1 change: 1 addition & 0 deletions packages/app/src/app/overmind/namespaces/sidebar/state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ type SidebarState = {
hasSyncedSandboxes: boolean | null;
hasTemplates: boolean | null;
repositories: Array<RepoInfo>;
sandboxes: Array<Sandbox>;
};

export type State = Record<string, SidebarState>;
Expand Down
Loading