import { useState } from 'react'; import { CloudUpload } from 'lucide-react'; import { Button } from '@/components/ui/button'; import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover'; import { useGitStatus } from '@/hooks/useGitStatus'; import { cn } from '@/lib/utils'; import { GitSyncSteps } from './GitSyncSteps'; interface GitSyncButtonProps { projectId: string; className?: string; } export function GitSyncButton({ projectId, className }: GitSyncButtonProps) { const [open, setOpen] = useState(false); const { data: gitStatus, isLoading: isGitStatusLoading } = useGitStatus(projectId); // Determine if we have a remote configured const originRemote = gitStatus?.remotes.find(r => r.name === 'origin'); const hasRemote = !!originRemote; // Determine if we need to show the indicator dot const showIndicator = !isGitStatusLoading && !hasRemote; return ( setOpen(false)} /> ); }