Clone non-owned Nostr repos to "upstream" remote

This commit is contained in:
Alex Gleason committed 2025-12-23 02:01:28 -06:00
1 parent 8b8958f7c8
commit 956dfb5099
3 files changed
+9 -5

No files matched your search

+3
View File
@@ -12,6 +12,7 @@ import { NostrURI } from '@/lib/NostrURI';
import { useProjectsManager } from '@/hooks/useProjectsManager';
import { useToast } from '@/hooks/useToast';
import { useTranslation } from 'react-i18next';
import { useCurrentUser } from '@/hooks/useCurrentUser';
interface RepositoryCardProps {
repo: Repository;
@@ -19,6 +20,7 @@ interface RepositoryCardProps {
export function RepositoryCard({ repo }: RepositoryCardProps) {
const { data: authorData } = useAuthor(repo.pubkey);
const { user } = useCurrentUser();
const navigate = useNavigate();
const projectsManager = useProjectsManager();
const { toast } = useToast();
@@ -44,6 +46,7 @@ export function RepositoryCard({ repo }: RepositoryCardProps) {
const project = await projectsManager.cloneProject({
name: repo.name,
repoUrl: nostrURI.toString(),
fork: user?.pubkey !== repo.pubkey,
});
toast({