Retrun false

This commit is contained in:
2024-10-03 21:18:35 +02:00
parent 7ec6823534
commit 93e675e0c7

View File

@@ -3,7 +3,7 @@ import { pullChanges, commitAndPush } from '../services/api';
export const useGitOperations = (gitEnabled) => { export const useGitOperations = (gitEnabled) => {
const pullLatestChanges = useCallback(async () => { const pullLatestChanges = useCallback(async () => {
if (!gitEnabled) return; if (!gitEnabled) return false;
try { try {
await pullChanges(); await pullChanges();
return true; return true;
@@ -15,7 +15,7 @@ export const useGitOperations = (gitEnabled) => {
const handleCommitAndPush = useCallback( const handleCommitAndPush = useCallback(
async (message) => { async (message) => {
if (!gitEnabled) return; if (!gitEnabled) return false;
try { try {
await commitAndPush(message); await commitAndPush(message);
return true; return true;