0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2025-01-20 21:32:31 -05:00

fix(console): update documentation links (#4957)

This commit is contained in:
Charles Zhao 2023-11-23 17:04:32 +08:00 committed by GitHub
parent f4383a3e58
commit 199b7997e3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 23 deletions

View file

@ -14,7 +14,7 @@ function FurtherReadings(props: Props, ref?: Ref<HTMLDivElement>) {
<TextLink
target="blank"
rel="noopener"
href="https://docs.logto.io/docs/tutorials/get-started/customize-sign-in-experience"
href="https://docs.logto.io/docs/recipes/customize-sie/"
>
Customize sign-in experience
</TextLink>
@ -23,25 +23,7 @@ function FurtherReadings(props: Props, ref?: Ref<HTMLDivElement>) {
<TextLink
target="blank"
rel="noopener"
href="https://docs.logto.io/docs/tutorials/get-started/passwordless-sign-in-by-adding-connectors#enable-sms-or-email-passwordless-sign-in"
>
Enable SMS or email passwordless sign-in
</TextLink>
</li>
<li>
<TextLink
target="blank"
rel="noopener"
href="https://docs.logto.io/docs/tutorials/get-started/passwordless-sign-in-by-adding-connectors#enable-social-sign-in"
>
Enable social sign-in
</TextLink>
</li>
<li>
<TextLink
target="blank"
rel="noopener"
href="https://docs.logto.io/docs/recipes/protect-your-api"
href="https://docs.logto.io/docs/recipes/protect-your-api/"
>
Protect your API
</TextLink>

View file

@ -73,8 +73,8 @@ function ApiResourceSettings() {
}
learnMoreLink={getDocumentationUrl(
isLogtoManagementApiResource
? '/docs/tutorials/get-started/explore-management-api'
: '/docs/recipes/protect-your-api'
? '/docs/recipes/interact-with-management-api/'
: '/docs/recipes/protect-your-api/'
)}
>
<FormField isRequired title="api_resources.api_name">

View file

@ -23,6 +23,7 @@ import DeleteConfirmModal from '@/ds-components/DeleteConfirmModal';
import TabNav, { TabNavItem } from '@/ds-components/TabNav';
import type { RequestError } from '@/hooks/use-api';
import useApi from '@/hooks/use-api';
import useDocumentationUrl from '@/hooks/use-documentation-url';
import useTenantPathname from '@/hooks/use-tenant-pathname';
import useTheme from '@/hooks/use-theme';
@ -41,6 +42,7 @@ function ApiResourceDetails() {
const { pathname } = useLocation();
const { id, guideId } = useParams();
const { navigate, match } = useTenantPathname();
const { getDocumentationUrl } = useDocumentationUrl();
const isGuideView = !!id && !!guideId && match(`/api-resources/${id}/guide/${guideId}`);
const { t } = useTranslation(undefined, { keyPrefix: 'admin_console' });
@ -121,7 +123,14 @@ function ApiResourceDetails() {
icon: <File />,
title: 'application_details.check_guide',
onClick: () => {
setIsGuideDrawerOpen(true);
if (isLogtoManagementApiResource) {
window.open(
getDocumentationUrl('/docs/recipes/interact-with-management-api/'),
'_blank'
);
} else {
setIsGuideDrawerOpen(true);
}
},
}}
actionMenuItems={[