From 46809b3a91de7ef9c64ab96aaed192ebc6a3a24b Mon Sep 17 00:00:00 2001 From: pillowboy <33105890+poolsar42@users.noreply.github.com> Date: Thu, 24 Aug 2023 12:05:02 -0400 Subject: [PATCH] fix(repo): UI issues (#2638) --- .../app/routes/__layout/billing/index.tsx | 50 +++++++++---------- apps/passport/app/root.tsx | 16 ++++-- .../email-otp-validator/EmailOTPValidator.tsx | 2 +- .../src/molecules/modal/Modal.tsx | 2 +- 4 files changed, 38 insertions(+), 32 deletions(-) diff --git a/apps/console/app/routes/__layout/billing/index.tsx b/apps/console/app/routes/__layout/billing/index.tsx index 51bc16797b..4be33d1946 100644 --- a/apps/console/app/routes/__layout/billing/index.tsx +++ b/apps/console/app/routes/__layout/billing/index.tsx @@ -404,18 +404,7 @@ const PurchaseProModal = ({ return ( setIsOpen(false)}>
- {!paymentData?.paymentMethodID ? ( -
- -
- ) : null} - -
+
+ {!paymentData?.paymentMethodID ? ( +
+ +
+ ) : null} +
setIsOpen(false)}>
- {!paymentData?.paymentMethodID ? ( -
- -
- ) : null}
+ {!paymentData?.paymentMethodID ? ( +
+ +
+ ) : null}
    @@ -838,11 +838,11 @@ const RemoveEntitelmentModal = ({ > {Array.apply(null, Array(entitlements + 1)).map( (_, i) => { - return ( + return i >= entitlementUsage ? ( - ) + ) : null } )} diff --git a/apps/passport/app/root.tsx b/apps/passport/app/root.tsx index dc66d3afd9..001b285348 100644 --- a/apps/passport/app/root.tsx +++ b/apps/passport/app/root.tsx @@ -69,14 +69,15 @@ export const links: LinksFunction = () => [ export const loader: LoaderFunction = getRollupReqFunctionErrorWrapper( async ({ request, context, params }) => { + const clientId = new URL(request.url).searchParams.get('client_id') if ( request.cf.botManagement.score <= 30 && !['localhost', '127.0.0.1'].includes(new URL(request.url).hostname) ) { let ogTheme = {} if ( - params.clientId && - !['console', 'passport'].includes(params.clientId) + (params.clientId || clientId) && + !['console', 'passport'].includes(params.clientId!) ) { const coreClient = getCoreClient({ context }) ogTheme = await coreClient.starbase.getOgTheme.query({ @@ -90,7 +91,7 @@ export const loader: LoaderFunction = getRollupReqFunctionErrorWrapper( if (context.appProps) { appProps = context.appProps } else { - if (!params.clientId) { + if (!params.clientId && !clientId) { const name = 'Passport' appProps = { name: `Rollup - ${name}`, @@ -103,7 +104,7 @@ export const loader: LoaderFunction = getRollupReqFunctionErrorWrapper( } else { if (['console', 'passport'].includes(params.clientId!)) { const name = - params.clientId.charAt(0).toUpperCase() + params.clientId.slice(1) + params.clientId!.charAt(0).toUpperCase() + params.clientId!.slice(1) appProps = { name: `Rollup - ${name}`, iconURL: LogoIndigo, @@ -115,7 +116,7 @@ export const loader: LoaderFunction = getRollupReqFunctionErrorWrapper( } else { const coreClient = getCoreClient({ context }) appProps = await coreClient.starbase.getAppPublicProps.query({ - clientId: params.clientId!, + clientId: (params.clientId || clientId) as string, }) } } @@ -269,6 +270,11 @@ export default function App() { {browserEnv?.appProps?.iconURL ? ( <> +
    -
    +
    We've sent a code to diff --git a/packages/design-system/src/molecules/modal/Modal.tsx b/packages/design-system/src/molecules/modal/Modal.tsx index 29628c5a81..5cf757d6d2 100644 --- a/packages/design-system/src/molecules/modal/Modal.tsx +++ b/packages/design-system/src/molecules/modal/Modal.tsx @@ -52,7 +52,7 @@ export const Modal = ({