mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-05 16:23:36 +00:00
Don't show sync indicator until after git information has loaded
This commit is contained in:
1 file changed
+2
-2
@@ -38,7 +38,7 @@ export function GitSyncButton({ projectId, className }: GitSyncButtonProps) {
|
||||
const [errorMessage, setErrorMessage] = useState<string | null>(null);
|
||||
const [copiedUrl, setCopiedUrl] = useState(false);
|
||||
|
||||
const { data: gitStatus } = useGitStatus(projectId);
|
||||
const { data: gitStatus, isLoading: isGitStatusLoading } = useGitStatus(projectId);
|
||||
const { settings } = useGitSettings();
|
||||
const { user } = useCurrentUser();
|
||||
const { git } = useGit();
|
||||
@@ -54,7 +54,7 @@ export function GitSyncButton({ projectId, className }: GitSyncButtonProps) {
|
||||
: null;
|
||||
|
||||
// Determine if we need to show the indicator dot
|
||||
const showIndicator = !hasRemote;
|
||||
const showIndicator = !isGitStatusLoading && !hasRemote;
|
||||
|
||||
// Reset state when popover opens/closes
|
||||
useEffect(() => {
|
||||
|
||||
Reference in new issue
Block a user