mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-05-13 19:30:39 +02:00
Add live git status indicators (#458)
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import type { GitCallbacks } from "@yaakapp-internal/git";
|
||||
import { useMemo } from "react";
|
||||
import { sync } from "../../init/sync";
|
||||
import { promptCredentials } from "./credentials";
|
||||
import { promptDivergedStrategy } from "./diverged";
|
||||
@@ -24,3 +25,7 @@ export function gitCallbacks(dir: string): GitCallbacks {
|
||||
forceSync: () => sync({ force: true }),
|
||||
};
|
||||
}
|
||||
|
||||
export function useGitCallbacks(dir: string): GitCallbacks {
|
||||
return useMemo(() => gitCallbacks(dir), [dir]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user