From 63184db15ada9d5f184faf958782c547ace9f085 Mon Sep 17 00:00:00 2001 From: Charles Zhao Date: Mon, 29 Jan 2024 10:14:35 +0800 Subject: [PATCH] fix(console): add dot before protected app first-level domain (#5323) --- .../Applications/components/ProtectedAppForm/index.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/console/src/pages/Applications/components/ProtectedAppForm/index.tsx b/packages/console/src/pages/Applications/components/ProtectedAppForm/index.tsx index 868967463..4d4236c05 100644 --- a/packages/console/src/pages/Applications/components/ProtectedAppForm/index.tsx +++ b/packages/console/src/pages/Applications/components/ProtectedAppForm/index.tsx @@ -1,7 +1,7 @@ import { isValidUrl } from '@logto/core-kit'; import { ApplicationType, type Application, type RequestErrorBody } from '@logto/schemas'; import { isValidSubdomain } from '@logto/shared/universal'; -import { conditional } from '@silverhand/essentials'; +import { condString, conditional } from '@silverhand/essentials'; import classNames from 'classnames'; import { HTTPError } from 'ky'; import { useForm } from 'react-hook-form'; @@ -115,7 +115,11 @@ function ProtectedAppForm({ t('protected_app.form.errors.domain_required')) } /> - {defaultDomain &&
{defaultDomain}
} + {defaultDomain && ( +
+ {condString(defaultDomain && `.${defaultDomain}`)} +
+ )}