Skip to content

Commit e3aa0a0

Browse files
committed
review notes
1 parent ce0bcc1 commit e3aa0a0

File tree

3 files changed

+4
-7
lines changed

3 files changed

+4
-7
lines changed

apps/code/src/renderer/features/onboarding/hooks/useProjectsWithIntegrations.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export interface ProjectWithIntegrations {
1313
}
1414

1515
export function useProjectsWithIntegrations() {
16-
const { projects, isLoading: projectsLoading } = useProjects();
16+
const { projects } = useProjects();
1717
const client = useAuthStore((s) => s.client);
1818

1919
// Fetch integrations for each project in parallel
@@ -29,8 +29,7 @@ export function useProjectsWithIntegrations() {
2929
})),
3030
});
3131

32-
const isLoading =
33-
projectsLoading || integrationQueries.some((q) => q.isLoading);
32+
const isLoading = integrationQueries.some((q) => q.isLoading);
3433
const isFetching = integrationQueries.some((q) => q.isFetching);
3534

3635
const projectsWithIntegrations: ProjectWithIntegrations[] = useMemo(() => {

apps/code/src/renderer/features/projects/hooks/useProjects.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,5 @@ export function useProjects() {
6868
groupedProjects,
6969
currentProject,
7070
currentProjectId,
71-
isLoading: false,
7271
};
7372
}

apps/code/src/renderer/features/sidebar/components/ProjectSwitcher.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,7 @@ export function ProjectSwitcher() {
5656
const cloudRegion = useAuthStore((s) => s.cloudRegion);
5757
const selectProject = useAuthStore((s) => s.selectProject);
5858
const logout = useAuthStore((s) => s.logout);
59-
const { groupedProjects, currentProject, currentProjectId, isLoading } =
60-
useProjects();
59+
const { groupedProjects, currentProject, currentProjectId } = useProjects();
6160
const { data: currentUser } = useMeQuery();
6261

6362
const handleProjectSelect = (projectId: number) => {
@@ -132,7 +131,7 @@ export function ProjectSwitcher() {
132131
gap="1"
133132
style={{ minWidth: 0, flex: 1, maxWidth: "calc(100% - 24px)" }}
134133
>
135-
{isLoading ? (
134+
{!currentProject && !currentUser ? (
136135
<>
137136
<Box className="h-4 w-24 animate-pulse rounded bg-gray-6" />
138137
<Box className="h-3.5 w-32 animate-pulse rounded bg-gray-5" />

0 commit comments

Comments
 (0)