mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-05 16:23:36 +00:00
Refactor code to use our custom Git class
This commit is contained in:
9 files changed
+93
-123
No files matched your search
@@ -36,9 +36,9 @@ import { AppSettingsDialog } from '@/components/AppSettingsDialog';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import { useProjectsManager } from '@/hooks/useProjectsManager';
|
||||
import { useToast } from '@/hooks/useToast';
|
||||
import { useGit } from '@/hooks/useGit';
|
||||
import { useFS } from '@/hooks/useFS';
|
||||
import JSZip from 'jszip';
|
||||
import git from 'isomorphic-git';
|
||||
|
||||
interface ActionsMenuProps {
|
||||
projectId: string;
|
||||
@@ -75,6 +75,7 @@ export function ActionsMenu({
|
||||
const navigate = useNavigate();
|
||||
const projectsManager = useProjectsManager();
|
||||
const { toast } = useToast();
|
||||
const git = useGit();
|
||||
const { fs } = useFS();
|
||||
|
||||
const isAnyLoading = isLoading || isBuildLoading || isDeployLoading || isDeleting || isExporting;
|
||||
@@ -156,7 +157,6 @@ export function ActionsMenu({
|
||||
try {
|
||||
// Get the current commit hash
|
||||
const commits = await git.log({
|
||||
fs,
|
||||
dir: projectPath,
|
||||
depth: 1,
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user