import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs"; import { api } from "@/utils/api"; import { GitBranch, LockIcon } from "lucide-react"; import Link from "next/link"; import { useState } from "react"; import { SaveGithubProviderCompose } from "./save-github-provider-compose"; import { ComposeFileEditor } from "../compose-file-editor"; import { SaveGitProviderCompose } from "./save-git-provider-compose"; type TabState = "github" | "git" | "raw"; interface Props { composeId: string; } export const ShowProviderFormCompose = ({ composeId }: Props) => { const { data: haveGithubConfigured } = api.admin.haveGithubConfigured.useQuery(); const { data: compose } = api.compose.one.useQuery({ composeId }); const [tab, setSab] = useState(compose?.sourceType || "github"); return (
Provider

Select the source of your code

{ setSab(e as TabState); }} > Github Git Raw {haveGithubConfigured ? ( ) : (
To deploy using GitHub, you need to configure your account first. Please, go to{" "} Settings {" "} to do so.
)}
); };