diff --git a/.eslintrc.json b/.eslintrc.json index 63cd6d4..1e5ed54 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -2,6 +2,7 @@ "extends": "next/core-web-vitals", "plugins": ["prettier"], "rules": { - "prettier/prettier": "error" + "prettier/prettier": "error", + "@next/next/no-img-element": "off" } } diff --git a/src/pages/[organizationSlug]/settings.tsx b/src/pages/[organizationSlug]/settings.tsx index a1f7561..ea986fa 100644 --- a/src/pages/[organizationSlug]/settings.tsx +++ b/src/pages/[organizationSlug]/settings.tsx @@ -21,13 +21,95 @@ import { withOrg } from "../../decorators/withOrg"; import { withSession } from "../../decorators/withSession"; import { useActiveOrg } from "../../hooks/useActiveOrg"; +import GithubAppInstallationAlert from "@/components/common/GithubAppInstallationAlert"; +import ListItem from "@/components/common/ListItem"; +import Section from "@/components/common/Section"; +import { Button, buttonVariants } from "@/components/ui/button"; import { useOrganizationMenu } from "@/hooks/useOrganizationMenu"; +import { cn } from "@/lib/utils"; +import { encodeObjectBase64 } from "@/services/encodeService"; + +import Link from "next/link"; +import { useRouter } from "next/router"; const Home: FunctionComponent = () => { const activeOrg = useActiveOrg(); const orgMenu = useOrganizationMenu(); + const router = useRouter(); - return ; + return ( + +
+

Organization Settings

+
+
+
+ {activeOrg.githubAppInstallations.map((installation) => ( + + {installation.targetLogin} + {installation.targetLogin} + + } + description={ + "DevGuard uses a GitHub App to access your repositories and interact with your code." + } + Button={ + + Manage GitHub App + + } + /> + ))} + Install GitHub App + + } + /> +
+
+
+ ); }; export default Home; diff --git a/src/types/api/api.ts b/src/types/api/api.ts index 3b3cfd4..2dc9d3e 100644 --- a/src/types/api/api.ts +++ b/src/types/api/api.ts @@ -41,8 +41,11 @@ export interface OrganizationDTO extends AppModelDTO { githubAppInstallations: Array<{ installationId: number; - targetType: string; settingsUrl: string; + + targetType: string; + targetLogin: string; + targetAvatarUrl: string; }>; }