diff --git a/src/components/GitSyncButton.tsx b/src/components/GitSyncButton.tsx deleted file mode 100644 index 9cda5dfa..00000000 --- a/src/components/GitSyncButton.tsx +++ /dev/null @@ -1,630 +0,0 @@ -import { useState, useEffect } from 'react'; -import { CloudUpload, Zap, GitBranch, Copy, Check, CheckCircle2 } from 'lucide-react'; -import { Button } from '@/components/ui/button'; -import { Input } from '@/components/ui/input'; -import { Label } from '@/components/ui/label'; -import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover'; -import { Alert, AlertDescription } from '@/components/ui/alert'; -import { ExternalFavicon } from '@/components/ExternalFavicon'; -import { useGitStatus } from '@/hooks/useGitStatus'; -import { useGitSettings } from '@/hooks/useGitSettings'; -import { useCurrentUser } from '@/hooks/useCurrentUser'; -import { useGit } from '@/hooks/useGit'; -import { useFSPaths } from '@/hooks/useFSPaths'; -import { Link } from 'react-router-dom'; -import { cn } from '@/lib/utils'; -import type { GitCredential } from '@/contexts/GitSettingsContext'; - -interface GitSyncButtonProps { - projectId: string; - className?: string; -} - -type SyncState = 'default' | 'select-provider' | 'configure-repo' | 'success' | 'error'; - -interface ProviderOption { - id: string; - name: string; - icon: React.ReactNode; - credential?: GitCredential; -} - -export function GitSyncButton({ projectId, className }: GitSyncButtonProps) { - const [open, setOpen] = useState(false); - const [syncState, setSyncState] = useState('default'); - const [selectedProvider, setSelectedProvider] = useState(null); - const [repositoryUrl, setRepositoryUrl] = useState(''); - const [isPushing, setIsPushing] = useState(false); - const [errorMessage, setErrorMessage] = useState(null); - const [copiedUrl, setCopiedUrl] = useState(false); - - const { data: gitStatus, isLoading: isGitStatusLoading, refetch: refetchGitStatus } = useGitStatus(projectId); - const { settings } = useGitSettings(); - const { user } = useCurrentUser(); - const { git } = useGit(); - const { projectsPath } = useFSPaths(); - - // Determine if we have a remote configured - const originRemote = gitStatus?.remotes.find(r => r.name === 'origin'); - const hasRemote = !!originRemote; - - // Match origin URL to a credential - const matchedCredential = originRemote - ? settings.credentials.find(c => originRemote.url.startsWith(c.origin)) - : null; - - // Determine if we need to show the indicator dot - const showIndicator = !isGitStatusLoading && !hasRemote; - - // Auto-reset success state after 2 seconds - useEffect(() => { - if (syncState === 'success') { - const timer = setTimeout(() => { - setSyncState('default'); - }, 2000); - return () => clearTimeout(timer); - } - }, [syncState]) - - // Reset state when popover opens/closes - useEffect(() => { - if (open) { - if (hasRemote) { - setSyncState('default'); - } else { - setSyncState('select-provider'); - } - setSelectedProvider(null); - setRepositoryUrl(''); - setErrorMessage(null); - } - }, [open, hasRemote]); - - // Build provider options - const providerOptions: ProviderOption[] = [ - { - id: 'nostr', - name: 'Nostr', - icon: , - }, - ...settings.credentials.map(credential => ({ - id: credential.id, - name: credential.name, - icon: ( - } - /> - ), - credential, - })), - { - id: 'other', - name: 'Other', - icon: , - }, - ]; - - const handleProviderSelect = (provider: ProviderOption) => { - setSelectedProvider(provider); - setErrorMessage(null); - - if (provider.id === 'other') { - // Show the "Other" state with link to settings - setSyncState('configure-repo'); - return; - } - - if (provider.id === 'nostr') { - if (!user) { - // Show the "Nostr" state with link to login - setSyncState('configure-repo'); - return; - } - // For Nostr, we can push directly - setSyncState('configure-repo'); - return; - } - - // For configured providers, show the repo URL input - setSyncState('configure-repo'); - }; - - const handlePushInitial = async () => { - if (!selectedProvider) return; - - setIsPushing(true); - setErrorMessage(null); - - try { - const dir = `${projectsPath}/${projectId}`; - - if (selectedProvider.id === 'nostr') { - // TODO: Implement Nostr push - // For now, just simulate success - await new Promise(resolve => setTimeout(resolve, 1000)); - - // Configure a Nostr URI as the origin - const nostrUri = `nostr://npub1example/${projectId}`; - await git.addRemote({ - dir, - remote: 'origin', - url: nostrUri, - }); - } else { - // Validate repository URL - if (!repositoryUrl.trim()) { - throw new Error('Repository URL is required'); - } - - // Add remote - await git.addRemote({ - dir, - remote: 'origin', - url: repositoryUrl, - force: true, // Override if exists - }); - - // Push to remote - await git.push({ - dir, - remote: 'origin', - ref: gitStatus?.currentBranch || 'main', - onAuth: () => { - if (selectedProvider.credential) { - return { - username: selectedProvider.credential.username, - password: selectedProvider.credential.password, - }; - } - return undefined; - }, - }); - } - - // Refresh git status before showing success - await refetchGitStatus(); - // Display success state - setSyncState('success'); - } catch (error) { - const message = error instanceof Error ? error.message : 'Failed to push'; - setErrorMessage(message); - setSyncState('error'); - } finally { - setIsPushing(false); - } - }; - - const handlePull = async () => { - if (!originRemote) return; - - setIsPushing(true); - setErrorMessage(null); - - try { - const dir = `${projectsPath}/${projectId}`; - - await git.pull({ - dir, - ref: gitStatus?.currentBranch || 'main', - singleBranch: true, - onAuth: () => { - if (matchedCredential) { - return { - username: matchedCredential.username, - password: matchedCredential.password, - }; - } - return undefined; - }, - }); - - setSyncState('success'); - } catch (error) { - const message = error instanceof Error ? error.message : 'Failed to pull'; - setErrorMessage(message); - setSyncState('error'); - } finally { - setIsPushing(false); - } - }; - - const handlePush = async () => { - if (!originRemote) return; - - setIsPushing(true); - setErrorMessage(null); - - try { - const dir = `${projectsPath}/${projectId}`; - - await git.push({ - dir, - remote: 'origin', - ref: gitStatus?.currentBranch || 'main', - onAuth: () => { - if (matchedCredential) { - return { - username: matchedCredential.username, - password: matchedCredential.password, - }; - } - return undefined; - }, - }); - - setSyncState('success'); - } catch (error) { - const message = error instanceof Error ? error.message : 'Failed to push'; - setErrorMessage(message); - setSyncState('error'); - } finally { - setIsPushing(false); - } - }; - - const handleCopyUrl = async () => { - if (!originRemote) return; - - try { - await navigator.clipboard.writeText(originRemote.url); - setCopiedUrl(true); - setTimeout(() => setCopiedUrl(false), 2000); - } catch (error) { - console.error('Failed to copy URL:', error); - } - }; - - const getProviderInfo = () => { - if (!originRemote) return null; - - // Check if it's a Nostr URI - if (originRemote.url.startsWith('nostr://')) { - return { - name: 'Nostr Git', - icon: , - }; - } - - // Check if we have a matched credential - if (matchedCredential) { - return { - name: matchedCredential.name, - icon: ( - } - /> - ), - }; - } - - // Fallback to generic Git - return { - name: 'Git', - icon: , - }; - }; - - const providerInfo = getProviderInfo(); - - const renderContent = () => { - // Configured state - show origin URL and pull/push buttons - if (hasRemote && syncState === 'default') { - return ( -
-
- {providerInfo?.icon} -

{providerInfo?.name}

-
- -
- -
- - -
-
- - {errorMessage && ( - - {errorMessage} - - )} - -
- - -
-
- ); - } - - // Success state - if (syncState === 'success') { - return ( -
-
- -
-
-
-

Successfully Synced!

-

- Your code has been synced to the remote repository. -

-
-
- ); - } - - // Error state - if (syncState === 'error') { - return ( -
- - {errorMessage} - - -
- - -
-
- ); - } - - // Configure repo state - if (syncState === 'configure-repo' && selectedProvider) { - // "Other" provider - show link to git settings - if (selectedProvider.id === 'other') { - return ( -
-
- {selectedProvider.icon} -

{selectedProvider.name}

-
- -

- Configure additional git providers in{' '} - setOpen(false)} - > - Git Settings - - . -

- - -
- ); - } - - // Nostr provider - check if user is logged in - if (selectedProvider.id === 'nostr') { - if (!user) { - return ( -
-
- {selectedProvider.icon} -

{selectedProvider.name}

-
- -

- You need to be logged in with Nostr to use this feature. Please visit{' '} - setOpen(false)} - > - Nostr Settings - {' '} - to log in. -

- - -
- ); - } - - return ( -
-
- {selectedProvider.icon} -

{selectedProvider.name}

-
- -

- Push your code to Nostr with one click. Your repository will be stored on Nostr relays. -

- - {errorMessage && ( - - {errorMessage} - - )} - - -
- ); - } - - // Regular git provider - show repository URL input - return ( -
-
- {selectedProvider.icon} -

{selectedProvider.name}

-
- -
- - setRepositoryUrl(e.target.value)} - /> -

- First create the repository on {selectedProvider.name}, then paste the URL here. -

-
- - {errorMessage && ( - - {errorMessage} - - )} - - -
- ); - } - - // Default state - select provider - return ( -
-
-

Sync your code to git

-

- Choose a provider to sync your project -

-
- -
- -
- {providerOptions.map((provider) => ( - - ))} -
-
-
- ); - }; - - return ( - - - - - - {renderContent()} - - - ); -} diff --git a/src/components/git-sync/GitSyncButton.tsx b/src/components/git-sync/GitSyncButton.tsx new file mode 100644 index 00000000..3c79d5db --- /dev/null +++ b/src/components/git-sync/GitSyncButton.tsx @@ -0,0 +1,46 @@ +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)} /> + + + ); +} diff --git a/src/components/git-sync/GitSyncSteps.tsx b/src/components/git-sync/GitSyncSteps.tsx new file mode 100644 index 00000000..066b9050 --- /dev/null +++ b/src/components/git-sync/GitSyncSteps.tsx @@ -0,0 +1,122 @@ +import { useState, useEffect } from 'react'; +import { useGitStatus } from '@/hooks/useGitStatus'; +import { SelectProviderStep } from './steps/SelectProviderStep'; +import { ConfigureRepoStep } from './steps/ConfigureRepoStep'; +import { SyncStep } from './steps/SyncStep'; +import { InitSuccessStep } from './steps/InitSuccessStep'; +import type { StepType, ProviderOption } from './types'; + +interface GitSyncStepsProps { + projectId: string; + isOpen: boolean; + onClose: () => void; +} + +export function GitSyncSteps({ projectId, isOpen, onClose }: GitSyncStepsProps) { + const [currentStep, setCurrentStep] = useState('select-provider'); + const [selectedProvider, setSelectedProvider] = useState(null); + + const { data: gitStatus, isLoading: isGitStatusLoading, refetch: refetchGitStatus } = useGitStatus(projectId); + + // Determine if we have a remote configured + const originRemote = gitStatus?.remotes.find(r => r.name === 'origin'); + const hasRemote = !!originRemote; + + // Reset state when popover opens/closes + useEffect(() => { + if (isOpen) { + if (hasRemote) { + setCurrentStep('sync'); + } else { + setCurrentStep('select-provider'); + } + setSelectedProvider(null); + } + }, [isOpen, hasRemote]); + + // Auto-reset success state after 2 seconds + useEffect(() => { + if (currentStep === 'init-success') { + const timer = setTimeout(() => { + setCurrentStep('sync'); + }, 2000); + return () => clearTimeout(timer); + } + }, [currentStep]); + + const handleSelectProvider = (provider: ProviderOption) => { + setSelectedProvider(provider); + setCurrentStep('configure-repo'); + }; + + const handleBack = () => { + setCurrentStep('select-provider'); + setSelectedProvider(null); + }; + + const handleSuccess = () => { + setCurrentStep('init-success'); + }; + + const handleRefetchStatus = async () => { + await refetchGitStatus(); + }; + + // Don't render anything while loading git status + if (isGitStatusLoading) { + return ( +
+
+
+ ); + } + + // Render the appropriate step + if (currentStep === 'select-provider') { + return ( + + ); + } + + if (currentStep === 'configure-repo' && selectedProvider) { + return ( + + ); + } + + if (currentStep === 'sync') { + return ( + + ); + } + + if (currentStep === 'init-success') { + return ( + + ); + } + + return null; +} diff --git a/src/components/git-sync/index.ts b/src/components/git-sync/index.ts new file mode 100644 index 00000000..bf56c1d2 --- /dev/null +++ b/src/components/git-sync/index.ts @@ -0,0 +1,2 @@ +export { GitSyncButton } from './GitSyncButton'; +export type { ProviderOption, StepType } from './types'; diff --git a/src/components/git-sync/steps/ConfigureRepoStep.tsx b/src/components/git-sync/steps/ConfigureRepoStep.tsx new file mode 100644 index 00000000..07813af7 --- /dev/null +++ b/src/components/git-sync/steps/ConfigureRepoStep.tsx @@ -0,0 +1,253 @@ +import { useState } from 'react'; +import { Button } from '@/components/ui/button'; +import { Input } from '@/components/ui/input'; +import { Label } from '@/components/ui/label'; +import { Alert, AlertDescription } from '@/components/ui/alert'; +import { useCurrentUser } from '@/hooks/useCurrentUser'; +import { useGit } from '@/hooks/useGit'; +import { useGitStatus } from '@/hooks/useGitStatus'; +import { useFSPaths } from '@/hooks/useFSPaths'; +import { Link } from 'react-router-dom'; +import type { ConfigureRepoStepProps } from '../types'; + +export function ConfigureRepoStep({ + projectId, + selectedProvider, + onBack, + onSuccess, + onClose, + onRefetchStatus, +}: ConfigureRepoStepProps & { onRefetchStatus: () => void }) { + const [repositoryUrl, setRepositoryUrl] = useState(''); + const [isPushing, setIsPushing] = useState(false); + const [error, setError] = useState(null); + + const { user } = useCurrentUser(); + const { git } = useGit(); + const { projectsPath } = useFSPaths(); + const { data: gitStatus } = useGitStatus(projectId); + + const handlePushInitial = async () => { + setIsPushing(true); + setError(null); + + try { + const dir = `${projectsPath}/${projectId}`; + + if (selectedProvider.id === 'nostr') { + // TODO: Implement Nostr push + // For now, just simulate success + await new Promise(resolve => setTimeout(resolve, 1000)); + + // Configure a Nostr URI as the origin + const nostrUri = `nostr://npub1example/${projectId}`; + await git.addRemote({ + dir, + remote: 'origin', + url: nostrUri, + }); + } else { + // Validate repository URL + if (!repositoryUrl.trim()) { + throw new Error('Repository URL is required'); + } + + // Add remote + await git.addRemote({ + dir, + remote: 'origin', + url: repositoryUrl, + force: true, // Override if exists + }); + + // Push to remote + await git.push({ + dir, + remote: 'origin', + ref: gitStatus?.currentBranch || 'main', + onAuth: () => { + if (selectedProvider.credential) { + return { + username: selectedProvider.credential.username, + password: selectedProvider.credential.password, + }; + } + return undefined; + }, + }); + } + + // Refresh git status before showing success + await onRefetchStatus(); + // Show success state + onSuccess(); + } catch (err) { + const message = err instanceof Error ? err.message : 'Failed to push'; + setError(message); + } finally { + setIsPushing(false); + } + }; + + // "Other" provider - show link to git settings + if (selectedProvider.id === 'other') { + return ( +
+
+ {selectedProvider.icon} +

{selectedProvider.name}

+
+ +

+ Configure additional git providers in{' '} + + Git Settings + + . +

+ + +
+ ); + } + + // Nostr provider - check if user is logged in + if (selectedProvider.id === 'nostr') { + if (!user) { + return ( +
+
+ {selectedProvider.icon} +

{selectedProvider.name}

+
+ +

+ You need to be logged in with Nostr to use this feature. Please visit{' '} + + Nostr Settings + {' '} + to log in. +

+ + +
+ ); + } + + return ( +
+
+ {selectedProvider.icon} +

{selectedProvider.name}

+
+ +

+ Push your code to Nostr with one click. Your repository will be stored on Nostr relays. +

+ + {error && ( + + {error} + + )} + +
+ + +
+
+ ); + } + + // Regular git provider - show repository URL input + return ( +
+
+ {selectedProvider.icon} +

{selectedProvider.name}

+
+ +
+ + setRepositoryUrl(e.target.value)} + /> +

+ First create the repository on {selectedProvider.name}, then paste the URL here. +

+
+ + {error && ( + + {error} + + )} + +
+ + +
+
+ ); +} diff --git a/src/components/git-sync/steps/InitSuccessStep.tsx b/src/components/git-sync/steps/InitSuccessStep.tsx new file mode 100644 index 00000000..7284c078 --- /dev/null +++ b/src/components/git-sync/steps/InitSuccessStep.tsx @@ -0,0 +1,19 @@ +import { CheckCircle2 } from 'lucide-react'; +import type { StepProps } from '../types'; + +export function InitSuccessStep(_props: StepProps) { + return ( +
+
+ +
+
+
+

Successfully Synced!

+

+ Your code has been synced to the remote repository. +

+
+
+ ); +} diff --git a/src/components/git-sync/steps/SelectProviderStep.tsx b/src/components/git-sync/steps/SelectProviderStep.tsx new file mode 100644 index 00000000..511e10dc --- /dev/null +++ b/src/components/git-sync/steps/SelectProviderStep.tsx @@ -0,0 +1,69 @@ +import { Zap, GitBranch } from 'lucide-react'; +import { Label } from '@/components/ui/label'; +import { ExternalFavicon } from '@/components/ExternalFavicon'; +import { useGitSettings } from '@/hooks/useGitSettings'; +import { cn } from '@/lib/utils'; +import type { SelectProviderStepProps, ProviderOption } from '../types'; + +export function SelectProviderStep({ + onSelectProvider, +}: SelectProviderStepProps) { + const { settings } = useGitSettings(); + + const providerOptions: ProviderOption[] = [ + { + id: 'nostr', + name: 'Nostr', + icon: , + }, + ...settings.credentials.map(credential => ({ + id: credential.id, + name: credential.name, + icon: ( + } + /> + ), + credential, + })), + { + id: 'other', + name: 'Other', + icon: , + }, + ]; + + return ( +
+
+

Sync your code to git

+

+ Choose a provider to sync your project +

+
+ +
+ +
+ {providerOptions.map((provider) => ( + + ))} +
+
+
+ ); +} diff --git a/src/components/git-sync/steps/SyncStep.tsx b/src/components/git-sync/steps/SyncStep.tsx new file mode 100644 index 00000000..c5f2c96e --- /dev/null +++ b/src/components/git-sync/steps/SyncStep.tsx @@ -0,0 +1,206 @@ +import { useState } from 'react'; +import { Zap, GitBranch, Copy, Check } from 'lucide-react'; +import { Button } from '@/components/ui/button'; +import { Input } from '@/components/ui/input'; +import { Label } from '@/components/ui/label'; +import { Alert, AlertDescription } from '@/components/ui/alert'; +import { ExternalFavicon } from '@/components/ExternalFavicon'; +import { useGitStatus } from '@/hooks/useGitStatus'; +import { useGitSettings } from '@/hooks/useGitSettings'; +import { useGit } from '@/hooks/useGit'; +import { useFSPaths } from '@/hooks/useFSPaths'; +import type { SyncStepProps } from '../types'; + +export function SyncStep({ projectId }: SyncStepProps) { + const [isPushing, setIsPushing] = useState(false); + const [error, setError] = useState(null); + const [copiedUrl, setCopiedUrl] = useState(false); + + const { data: gitStatus } = useGitStatus(projectId); + const { settings } = useGitSettings(); + const { git } = useGit(); + const { projectsPath } = useFSPaths(); + + const originRemote = gitStatus?.remotes.find(r => r.name === 'origin'); + + // Match origin URL to a credential + const matchedCredential = originRemote + ? settings.credentials.find(c => originRemote.url.startsWith(c.origin)) + : null; + + const handlePull = async () => { + if (!originRemote) return; + + setIsPushing(true); + setError(null); + + try { + const dir = `${projectsPath}/${projectId}`; + + await git.pull({ + dir, + ref: gitStatus?.currentBranch || 'main', + singleBranch: true, + onAuth: () => { + if (matchedCredential) { + return { + username: matchedCredential.username, + password: matchedCredential.password, + }; + } + return undefined; + }, + }); + } catch (err) { + const message = err instanceof Error ? err.message : 'Failed to pull'; + setError(message); + } finally { + setIsPushing(false); + } + }; + + const handlePush = async () => { + if (!originRemote) return; + + setIsPushing(true); + setError(null); + + try { + const dir = `${projectsPath}/${projectId}`; + + await git.push({ + dir, + remote: 'origin', + ref: gitStatus?.currentBranch || 'main', + onAuth: () => { + if (matchedCredential) { + return { + username: matchedCredential.username, + password: matchedCredential.password, + }; + } + return undefined; + }, + }); + } catch (err) { + const message = err instanceof Error ? err.message : 'Failed to push'; + setError(message); + } finally { + setIsPushing(false); + } + }; + + const handleCopyUrl = async () => { + if (!originRemote) return; + + try { + await navigator.clipboard.writeText(originRemote.url); + setCopiedUrl(true); + setTimeout(() => setCopiedUrl(false), 2000); + } catch (err) { + console.error('Failed to copy URL:', err); + } + }; + + const getProviderInfo = () => { + if (!originRemote) return null; + + // Check if it's a Nostr URI + if (originRemote.url.startsWith('nostr://')) { + return { + name: 'Nostr Git', + icon: , + }; + } + + // Check if we have a matched credential + if (matchedCredential) { + return { + name: matchedCredential.name, + icon: ( + } + /> + ), + }; + } + + // Fallback to generic Git + return { + name: 'Git', + icon: , + }; + }; + + const providerInfo = getProviderInfo(); + + if (!originRemote) { + return null; + } + + return ( +
+
+ {providerInfo?.icon} +

{providerInfo?.name}

+
+ +
+ +
+ + +
+
+ + {error && ( + + {error} + + )} + +
+ + +
+
+ ); +} diff --git a/src/components/git-sync/types.ts b/src/components/git-sync/types.ts new file mode 100644 index 00000000..54390e6d --- /dev/null +++ b/src/components/git-sync/types.ts @@ -0,0 +1,35 @@ +import type { GitCredential } from '@/contexts/GitSettingsContext'; +import type { ReactNode } from 'react'; + +export interface ProviderOption { + id: string; + name: string; + icon: ReactNode; + credential?: GitCredential; +} + +export type StepType = + | 'select-provider' + | 'configure-repo' + | 'sync' + | 'init-success'; + +export interface StepProps { + projectId: string; + onChangeStep: (step: StepType) => void; + onClose: () => void; +} + +export interface SelectProviderStepProps extends StepProps { + onSelectProvider: (provider: ProviderOption) => void; +} + +export interface ConfigureRepoStepProps extends StepProps { + selectedProvider: ProviderOption; + onBack: () => void; + onSuccess: () => void; +} + +export interface SyncStepProps extends StepProps { + onRefetchStatus: () => void; +} diff --git a/src/pages/ProjectView.tsx b/src/pages/ProjectView.tsx index e704f3af..eef7ee3a 100644 --- a/src/pages/ProjectView.tsx +++ b/src/pages/ProjectView.tsx @@ -19,7 +19,7 @@ import { DeployDialog } from '@/components/DeployDialog'; import { DuplicateProjectDialog } from '@/components/DuplicateProjectDialog'; import { GitStatusIndicator } from '@/components/GitStatusIndicator'; import { StarButton } from '@/components/StarButton'; -import { GitSyncButton } from '@/components/GitSyncButton'; +import { GitSyncButton } from '@/components/git-sync'; import { useBuildProject } from '@/hooks/useBuildProject'; import { useIsProjectPreviewable } from '@/hooks/useIsProjectPreviewable'; import { useConsoleError } from '@/hooks/useConsoleError';