mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-06 00:27:24 +00:00
Clone non-owned Nostr repos to "upstream" remote
This commit is contained in:
3 files changed
+9
-5
No files matched your search
@@ -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({
|
||||
|
||||
Reference in new issue
Block a user