'use client'; import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card'; import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs'; import type { Project, User, UserProject } from '@prisma/client'; import { UniversalForm } from '../UniversalForm/UniversalForm'; import { customData, editProject, githubSettings, githubTestIssue, ratelimitChange, } from '@/lib/forms/actions'; import { bodyGen, bodyGenNoIdent } from '@/lib/bodyGen'; import { Breadcrumb, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, } from '@/components/ui/breadcrumb'; import GithubRepoChooser from '../GithubRepoChooser/GithubRepoChooser'; import React from 'react'; import Link from 'next/link'; import InviteCodeViewer from '../InviteCodeViewer/InviteCodeViewer'; import ProjectTeamUsers from '../ProjectTeamUsers/ProjectTeamUsers'; import { useSession } from '@/lib/providers/SessionProvider'; export default function ProjectSettings(project: ProjectWithUsers) { const { user } = useSession(); const [ghRepo, setGhRepo] = React.useState(''); const [ghInstallationId, setGhInstallationId] = React.useState(''); const [hasSubmitted, setHasSubmitted] = React.useState(false); const apiUrl = `https://${window.location.hostname}/api/feedback/${project.id}`; React.useEffect(() => { setHasSubmitted(project.github !== ''); }, [project.github]); return (
Manage your project configuration and preferences
This action is irreversible. All feedback and settings will be lost.
Not the results you were expecting? You may have not allowed your user in the{' '} installation settings .
You need to connect your project to a GitHub repository before you can test issue submission.
)}
{apiUrl}
POST
{bodyGen(project.customData)}
{stripIndents`curl -X POST \\
-d '${bodyGenNoIdent(project.customData)}' \\
${apiUrl}`}