mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-06 00:27:24 +00:00
Refactor Git to accept a nostr object
This commit is contained in:
16 files changed
+184
-379
No files matched your search
@@ -1,6 +1,7 @@
|
||||
import { useMemo } from 'react';
|
||||
import { ProjectsManager } from '@/lib/ProjectsManager';
|
||||
import { useFS } from '@/hooks/useFS';
|
||||
import { useGit } from './useGit';
|
||||
|
||||
/**
|
||||
* Hook that provides a ProjectsManager instance.
|
||||
@@ -8,8 +9,11 @@ import { useFS } from '@/hooks/useFS';
|
||||
*/
|
||||
export function useProjectsManager() {
|
||||
const { fs } = useFS();
|
||||
const { git } = useGit();
|
||||
|
||||
const projectsManager = useMemo(() => new ProjectsManager(fs), [fs]);
|
||||
const projectsManager = useMemo(() => {
|
||||
return new ProjectsManager({ fs, git });
|
||||
}, [fs, git]);
|
||||
|
||||
return projectsManager;
|
||||
}
|
||||
Reference in new issue
Block a user