Added button to add integrations
This commit is contained in:
parent
4dacf64a18
commit
d249c62620
2 changed files with 16 additions and 10 deletions
|
@ -1,5 +1,5 @@
|
||||||
import Link from 'next/link';
|
import Link from 'next/link';
|
||||||
import {useContext, useEffect, useState} from "react";
|
import {useEffect, useState} from "react";
|
||||||
import {useRouter} from "next/router";
|
import {useRouter} from "next/router";
|
||||||
import {signOut, useSession} from 'next-auth/client';
|
import {signOut, useSession} from 'next-auth/client';
|
||||||
import {MenuIcon, XIcon} from '@heroicons/react/outline';
|
import {MenuIcon, XIcon} from '@heroicons/react/outline';
|
||||||
|
@ -133,7 +133,7 @@ export default function Shell(props) {
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
</nav>
|
</nav>
|
||||||
<header className="py-10">
|
<header className={props.noPaddingBottom ? "pt-10" : "py-10"}>
|
||||||
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
||||||
<h1 className="text-3xl font-bold text-white">
|
<h1 className="text-3xl font-bold text-white">
|
||||||
{props.heading}
|
{props.heading}
|
||||||
|
|
|
@ -3,8 +3,8 @@ import Link from 'next/link';
|
||||||
import prisma from '../../lib/prisma';
|
import prisma from '../../lib/prisma';
|
||||||
import Shell from '../../components/Shell';
|
import Shell from '../../components/Shell';
|
||||||
import {useState} from 'react';
|
import {useState} from 'react';
|
||||||
import { useSession, getSession } from 'next-auth/client';
|
import {getSession, useSession} from 'next-auth/client';
|
||||||
import { CheckCircleIcon, XCircleIcon, ChevronRightIcon, PlusIcon } from '@heroicons/react/solid';
|
import {CheckCircleIcon, ChevronRightIcon, PlusIcon, XCircleIcon} from '@heroicons/react/solid';
|
||||||
import {InformationCircleIcon} from '@heroicons/react/outline';
|
import {InformationCircleIcon} from '@heroicons/react/outline';
|
||||||
|
|
||||||
export default function Home({ integrations }) {
|
export default function Home({ integrations }) {
|
||||||
|
@ -32,7 +32,13 @@ export default function Home({ integrations }) {
|
||||||
<link rel="icon" href="/favicon.ico" />
|
<link rel="icon" href="/favicon.ico" />
|
||||||
</Head>
|
</Head>
|
||||||
|
|
||||||
<Shell heading="Integrations">
|
<Shell heading="Integrations" noPaddingBottom>
|
||||||
|
<div className="text-right py-2">
|
||||||
|
<button onClick={toggleAddModal} type="button"
|
||||||
|
className="px-4 py-2 border border-gray-300 shadow-sm text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500">
|
||||||
|
Add new integration
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
<div className="bg-white shadow overflow-hidden rounded-lg">
|
<div className="bg-white shadow overflow-hidden rounded-lg">
|
||||||
{integrations.filter( (ig) => ig.credential ).length !== 0 ? <ul className="divide-y divide-gray-200">
|
{integrations.filter( (ig) => ig.credential ).length !== 0 ? <ul className="divide-y divide-gray-200">
|
||||||
{integrations.filter(ig => ig.credential).map( (ig) => (<li>
|
{integrations.filter(ig => ig.credential).map( (ig) => (<li>
|
||||||
|
|
Loading…
Reference in a new issue