mirror of
https://github.com/logto-io/logto.git
synced 2025-02-17 22:04:19 -05:00
feat(console): add custom domain related links (#4061)
This commit is contained in:
parent
234a2a4abb
commit
41bf863e5e
2 changed files with 10 additions and 2 deletions
|
@ -2,6 +2,7 @@ import { type Domain, DomainStatus } from '@logto/schemas';
|
||||||
import { Trans, useTranslation } from 'react-i18next';
|
import { Trans, useTranslation } from 'react-i18next';
|
||||||
|
|
||||||
import TextLink from '@/ds-components/TextLink';
|
import TextLink from '@/ds-components/TextLink';
|
||||||
|
import useDocumentationUrl from '@/hooks/use-documentation-url';
|
||||||
|
|
||||||
import ActivationProcess from './ActivationProcess';
|
import ActivationProcess from './ActivationProcess';
|
||||||
import CustomDomainHeader from './CustomDomainHeader';
|
import CustomDomainHeader from './CustomDomainHeader';
|
||||||
|
@ -14,6 +15,7 @@ type Props = {
|
||||||
|
|
||||||
function CustomDomain({ customDomain, onDeleteCustomDomain }: Props) {
|
function CustomDomain({ customDomain, onDeleteCustomDomain }: Props) {
|
||||||
const { t } = useTranslation(undefined, { keyPrefix: 'admin_console' });
|
const { t } = useTranslation(undefined, { keyPrefix: 'admin_console' });
|
||||||
|
const { getDocumentationUrl } = useDocumentationUrl();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
@ -30,8 +32,11 @@ function CustomDomain({ customDomain, onDeleteCustomDomain }: Props) {
|
||||||
<div className={styles.notes}>
|
<div className={styles.notes}>
|
||||||
<Trans
|
<Trans
|
||||||
components={{
|
components={{
|
||||||
// TODO LOG-6298 @xiaoyijun update this link when related docs are ready.
|
a: (
|
||||||
a: <TextLink to="#" />,
|
<TextLink
|
||||||
|
to={getDocumentationUrl('docs/recipes/custom-domain/use-custom-domain')}
|
||||||
|
/>
|
||||||
|
),
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('domain.update_endpoint_notice', { link: t('general.learn_more') })}
|
{t('domain.update_endpoint_notice', { link: t('general.learn_more') })}
|
||||||
|
|
|
@ -4,6 +4,7 @@ import FormCard from '@/components/FormCard';
|
||||||
import PageMeta from '@/components/PageMeta';
|
import PageMeta from '@/components/PageMeta';
|
||||||
import FormField from '@/ds-components/FormField';
|
import FormField from '@/ds-components/FormField';
|
||||||
import useCustomDomain from '@/hooks/use-custom-domain';
|
import useCustomDomain from '@/hooks/use-custom-domain';
|
||||||
|
import useDocumentationUrl from '@/hooks/use-documentation-url';
|
||||||
|
|
||||||
import AddDomainForm from './AddDomainForm';
|
import AddDomainForm from './AddDomainForm';
|
||||||
import CustomDomain from './CustomDomain';
|
import CustomDomain from './CustomDomain';
|
||||||
|
@ -12,6 +13,7 @@ import * as styles from './index.module.scss';
|
||||||
|
|
||||||
function TenantDomainSettings() {
|
function TenantDomainSettings() {
|
||||||
const { data: customDomain, isLoading, mutate } = useCustomDomain(true);
|
const { data: customDomain, isLoading, mutate } = useCustomDomain(true);
|
||||||
|
const { getDocumentationUrl } = useDocumentationUrl();
|
||||||
|
|
||||||
if (isLoading) {
|
if (isLoading) {
|
||||||
return null;
|
return null;
|
||||||
|
@ -23,6 +25,7 @@ function TenantDomainSettings() {
|
||||||
<FormCard
|
<FormCard
|
||||||
title="domain.custom.custom_domain"
|
title="domain.custom.custom_domain"
|
||||||
description="domain.custom.custom_domain_description"
|
description="domain.custom.custom_domain_description"
|
||||||
|
learnMoreLink={getDocumentationUrl('docs/recipes/custom-domain')}
|
||||||
>
|
>
|
||||||
<FormField title="domain.custom.custom_domain_field">
|
<FormField title="domain.custom.custom_domain_field">
|
||||||
{customDomain ? (
|
{customDomain ? (
|
||||||
|
|
Loading…
Add table
Reference in a new issue