From e704ab5aaaf75582f85d270528308d7e3027fdfd Mon Sep 17 00:00:00 2001 From: Joshen Lim Date: Thu, 22 Jun 2023 22:07:18 +0800 Subject: [PATCH] Update according to requirements --- .../Organization/OAuthApps/OAuthAppRow.tsx | 71 ++++++++++++++++ .../Organization/OAuthApps/OAuthApps.tsx | 84 +++++++++++++------ .../OAuthApps/PublishAppModal.tsx | 28 ++++++- .../data/oauth/oauth-app-create-mutation.ts | 8 +- 4 files changed, 159 insertions(+), 32 deletions(-) create mode 100644 studio/components/interfaces/Organization/OAuthApps/OAuthAppRow.tsx diff --git a/studio/components/interfaces/Organization/OAuthApps/OAuthAppRow.tsx b/studio/components/interfaces/Organization/OAuthApps/OAuthAppRow.tsx new file mode 100644 index 00000000000..f0a12c1ee54 --- /dev/null +++ b/studio/components/interfaces/Organization/OAuthApps/OAuthAppRow.tsx @@ -0,0 +1,71 @@ +import Table from 'components/to-be-cleaned/Table' +import { OAuthApp } from 'data/oauth/oauth-apps-query' +import dayjs from 'dayjs' +import { copyToClipboard } from 'lib/helpers' +import { useState } from 'react' +import { + Button, + Dropdown, + IconCheck, + IconClipboard, + IconEdit, + IconMoreVertical, + IconTrash, +} from 'ui' + +export interface OAuthAppRowProps { + app: OAuthApp + onSelectEdit: () => void + onSelectDelete: () => void +} + +const OAuthAppRow = ({ app, onSelectEdit, onSelectDelete }: OAuthAppRowProps) => { + const [isCopied, setIsCopied] = useState(false) + + return ( + + {app.name} + + {app.client_id} +