Add git branch switcher

This commit is contained in:
Alex Gleason committed 2025-12-28 17:51:37 -06:00
1 parent 41f4a53b1f
commit 1c54a889ce
3 files changed
+493 -1

No files matched your search

+9 -1
View File
@@ -20,6 +20,7 @@ import { DuplicateProjectDialog } from '@/components/DuplicateProjectDialog';
import { GitStatusIndicator } from '@/components/GitStatusIndicator';
import { GitSyncButton } from '@/components/git-sync';
import { DeployButton } from '@/components/deploy/DeployButton';
import { BranchSwitcher } from '@/components/BranchSwitcher';
import { useBuildProject } from '@/hooks/useBuildProject';
import { useIsProjectPreviewable } from '@/hooks/useIsProjectPreviewable';
import { useConsoleError } from '@/hooks/useConsoleError';
@@ -226,6 +227,10 @@ export function ProjectView() {
<div className="flex items-center gap-2">
{project ? (
<>
<BranchSwitcher
projectId={project.id}
className="h-8 w-8"
/>
<GitSyncButton
projectId={project.id}
className="h-8 w-8"
@@ -240,6 +245,7 @@ export function ProjectView() {
<>
<Skeleton className="h-8 w-8 rounded" />
<Skeleton className="h-8 w-8 rounded" />
<Skeleton className="h-8 w-8 rounded" />
</>
)}
</div>
@@ -453,10 +459,11 @@ export function ProjectView() {
</div>
</div>
{/* Right side - Deploy and Sync buttons */}
{/* Right side - Branch, Deploy and Sync buttons */}
<div className="flex items-center gap-2">
{project ? (
<>
<BranchSwitcher projectId={project.id} />
<GitSyncButton
projectId={project.id}
className="h-8 w-8"
@@ -471,6 +478,7 @@ export function ProjectView() {
<>
<Skeleton className="h-8 w-8 rounded" />
<Skeleton className="h-8 w-8 rounded" />
<Skeleton className="h-8 w-8 rounded" />
</>
)}
</div>