From fd04e6dab0fb6032a48a4e3b1cc79665c67b7590 Mon Sep 17 00:00:00 2001 From: Joshen Lim Date: Mon, 23 Sep 2024 16:10:46 +0800 Subject: [PATCH] Address some feedback around redirect urls (#29449) * Address some feedback around redirect urls * Remove unused code --- .../Auth/RedirectUrls/RedirectUrlList.tsx | 8 ++++-- .../Auth/RedirectUrls/RedirectUrls.tsx | 25 ++++++++++++------- 2 files changed, 22 insertions(+), 11 deletions(-) diff --git a/apps/studio/components/interfaces/Auth/RedirectUrls/RedirectUrlList.tsx b/apps/studio/components/interfaces/Auth/RedirectUrls/RedirectUrlList.tsx index e34d9195ff6..8ee007d54b4 100644 --- a/apps/studio/components/interfaces/Auth/RedirectUrls/RedirectUrlList.tsx +++ b/apps/studio/components/interfaces/Auth/RedirectUrls/RedirectUrlList.tsx @@ -60,8 +60,7 @@ export const RedirectUrlList = ({ return (
- -

Total URLs: {allowList.length}

+ {selectedUrls.length > 0 ? (
)} + {allowList.length > 0 && ( + +

Total URLs: {allowList.length}

+
+ )}
) } diff --git a/apps/studio/components/interfaces/Auth/RedirectUrls/RedirectUrls.tsx b/apps/studio/components/interfaces/Auth/RedirectUrls/RedirectUrls.tsx index fb5d458f8d2..aeedde4b7c1 100644 --- a/apps/studio/components/interfaces/Auth/RedirectUrls/RedirectUrls.tsx +++ b/apps/studio/components/interfaces/Auth/RedirectUrls/RedirectUrls.tsx @@ -14,7 +14,9 @@ import { Alert_Shadcn_, Button, Modal, + ScrollArea, WarningIcon, + cn, } from 'ui' import { AddNewURLModal } from './AddNewURLModal' import { RedirectUrlList } from './RedirectUrlList' @@ -130,17 +132,22 @@ export const RedirectUrls = () => { setOpenRemoveSelected(false) }} > - +

- Are you sure you want to remove the following URLs? + Are you sure you want to remove the following {selectedUrls.length} URL + {selectedUrls.length > 1 ? 's' : ''}?

-
    - {selectedUrls.map((url, index) => ( -
  • - {url} -
  • - ))} -
+ 4 ? 'h-[250px]' : '')}> +
+ {selectedUrls.map((url) => { + return ( + + {url} + + ) + })} +
+

These URLs will no longer work with your authentication configuration.