mirror of
https://github.com/lordmathis/lemma.git
synced 2025-11-05 23:44:22 +00:00
Retrun false
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user