feat: github importer (#722)

* chore: github importer first step completed

* refactor: github importer code refactored

* chore: github importer functionality completed

* fix: import data step saved data
This commit is contained in:
Aaryan Khandelwal 2023-04-06 00:51:15 +05:30 committed by GitHub
parent 6b8b981e1d
commit c9d8a8dbd1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
31 changed files with 1211 additions and 718 deletions

View file

@ -6,6 +6,7 @@ import useSWR from "swr";
// services
import workspaceService from "services/workspace.service";
import IntegrationService from "services/integration";
// lib
import { requiredWorkspaceAdmin } from "lib/auth";
// layouts
@ -30,8 +31,8 @@ const WorkspaceIntegrations: NextPage<UserAuth> = (props) => {
() => (workspaceSlug ? workspaceService.getWorkspace(workspaceSlug as string) : null)
);
const { data: integrations } = useSWR(workspaceSlug ? APP_INTEGRATIONS : null, () =>
workspaceSlug ? workspaceService.getIntegrations() : null
const { data: appIntegrations } = useSWR(workspaceSlug ? APP_INTEGRATIONS : null, () =>
workspaceSlug ? IntegrationService.getAppIntegrationsList() : null
);
return (
@ -52,8 +53,8 @@ const WorkspaceIntegrations: NextPage<UserAuth> = (props) => {
<section className="space-y-8">
<h3 className="text-2xl font-semibold">Integrations</h3>
<div className="space-y-5">
{integrations ? (
integrations.map((integration) => (
{appIntegrations ? (
appIntegrations.map((integration) => (
<OAuthPopUp
key={integration.id}
workspaceSlug={workspaceSlug}