diff --git a/frontend/src/components/settings/git/status/OutgoingChanges.jsx b/frontend/src/components/settings/git/status/OutgoingChanges.jsx
index 6d05e6d..3be0ee8 100644
--- a/frontend/src/components/settings/git/status/OutgoingChanges.jsx
+++ b/frontend/src/components/settings/git/status/OutgoingChanges.jsx
@@ -1,4 +1,5 @@
-import React from 'react';
+import React, {useRef, useState, useEffect} from 'react';
+import ReactDOM from 'react-dom';
import {
ArrowUpFromLine,
Plus,
@@ -38,6 +39,56 @@ const OutgoingChanges = ({
const totalOutgoingChanges = changes.length;
const totalUnpushedCommits = unpushedFiles?.length || 0;
+ const PushButton = () => {
+ const [showTooltip, setShowTooltip] = useState(false);
+ const buttonRef = useRef(null);
+
+ return (
+ <>
+
setShowTooltip(true)}
+ onMouseLeave={() => setShowTooltip(false)}>
+ }
+ className='bg-gray-700'
+ />
+
+ {showTooltip &&
+ buttonRef.current &&
+ ReactDOM.createPortal(
+
+ {unpushedFiles?.length > 0 && (
+
+ {unpushedFiles.map((file, index) => (
+
+ • {file.type}: {file.name}
+
+ ))}
+
+ )}
+
,
+ document.body
+ )}
+ >
+ );
+ };
// If we only have committed changes waiting to be pushed
if (totalOutgoingChanges === 0 && hasUnpushedCommits) {
console.log('Unpushed Files:', unpushedFiles);
@@ -52,6 +103,9 @@ const OutgoingChanges = ({
/>
Ready to Push ({totalUnpushedCommits})
+
@@ -113,33 +167,7 @@ const OutgoingChanges = ({
className='bg-gray-700'
disabledTooltip={getButtonTooltips.revert()}
/>
- {hasUnpushedCommits && (
-
}
- tooltip={
-
-
Push Changes
- {unpushedFiles?.length > 0 && (
-
- {unpushedFiles.map(
- (file, index) => (
-
- • {file.type}:{' '}
- {file.name}
-
- )
- )}
-
- )}
-
- }
- className='bg-gray-700'
- disabledTooltip='No changes to push'
- />
- )}
+
{changes.length > 0 && (