0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2025-02-10 21:58:23 -05:00

refactor(console): tutorial -> guide

This commit is contained in:
Gao Sun 2024-02-23 22:05:23 +08:00
parent 07e145b903
commit 2c25a3eb4e
No known key found for this signature in database
GPG key ID: 13EBE123E4773688
17 changed files with 23 additions and 23 deletions

View file

@ -7,7 +7,7 @@ const metadata: Readonly<GuideMetadata> = Object.freeze({
description: 'Enables direct communication between machines.',
target: ApplicationType.MachineToMachine,
isFeatured: true,
fullTutorial: {
fullGuide: {
title: 'Full machine-to-machine integration tutorial',
url: 'https://docs.logto.io/sdk/m2m',
},

View file

@ -10,7 +10,7 @@ const metadata: Readonly<GuideMetadata> = Object.freeze({
repo: 'kotlin',
path: 'android-sample-kotlin',
},
fullTutorial: {
fullGuide: {
title: 'Full Android SDK tutorial',
url: 'https://docs.logto.io/sdk/android',
},

View file

@ -11,7 +11,7 @@ const metadata: Readonly<GuideMetadata> = Object.freeze({
path: 'packages/react-sample',
},
isFeatured: true,
fullTutorial: {
fullGuide: {
title: 'Full React SDK tutorial',
url: 'https://docs.logto.io/sdk/react',
},

View file

@ -10,7 +10,7 @@ const metadata: Readonly<GuideMetadata> = Object.freeze({
repo: 'js',
path: 'packages/browser-sample',
},
fullTutorial: {
fullGuide: {
title: 'Full vanilla JS SDK tutorial',
url: 'https://docs.logto.io/sdk/vanilla-js',
},

View file

@ -12,7 +12,7 @@ const metadata: Readonly<GuideMetadata> = Object.freeze({
path: 'packages/vue-sample',
},
isFeatured: true,
fullTutorial: {
fullGuide: {
title: 'Full Vue SDK tutorial',
url: 'https://docs.logto.io/sdk/vue',
},

View file

@ -31,8 +31,8 @@ export type GuideMetadata = {
/** Indicate whether the application is for third-party use */
isThirdParty?: boolean;
/** The related complete tutorial doc for this guide which will be displayed in the 'Further readings' section. */
fullTutorial?: {
/** The related complete guide for this guide which will be displayed in the 'Further readings' section. */
fullGuide?: {
title: string;
url: string;
};

View file

@ -10,7 +10,7 @@ const metadata: Readonly<GuideMetadata> = Object.freeze({
repo: 'csharp',
path: '/',
},
fullTutorial: {
fullGuide: {
title: 'Full .NET Core (Blazor Server) integration tutorial',
url: 'https://docs.logto.io/sdk/dotnet-core/blazor-server',
},

View file

@ -10,7 +10,7 @@ const metadata: Readonly<GuideMetadata> = Object.freeze({
repo: 'csharp',
path: '/',
},
fullTutorial: {
fullGuide: {
title: 'Full .NET Core (Blazor WASM) integration tutorial',
url: 'https://docs.logto.io/sdk/dotnet-core/blazor-wasm',
},

View file

@ -10,7 +10,7 @@ const metadata: Readonly<GuideMetadata> = Object.freeze({
repo: 'csharp',
path: '/',
},
fullTutorial: {
fullGuide: {
title: 'Full .NET Core (MVC) integration tutorial',
url: 'https://docs.logto.io/sdk/dotnet-core/mvc',
},

View file

@ -11,7 +11,7 @@ const metadata: Readonly<GuideMetadata> = Object.freeze({
repo: 'js',
path: 'packages/express-sample',
},
fullTutorial: {
fullGuide: {
title: 'Full Express SDK tutorial',
url: 'https://docs.logto.io/sdk/express',
},

View file

@ -11,7 +11,7 @@ const metadata: Readonly<GuideMetadata> = Object.freeze({
repo: 'go',
path: 'gin-sample',
},
fullTutorial: {
fullGuide: {
title: 'Full Go SDK tutorial',
url: 'https://docs.logto.io/sdk/go',
},

View file

@ -11,7 +11,7 @@ const metadata: Readonly<GuideMetadata> = Object.freeze({
repo: 'js',
path: 'packages/next-app-dir-sample',
},
fullTutorial: {
fullGuide: {
title: 'Full Next.js App Router SDK tutorial',
url: 'https://docs.logto.io/sdk/next-app-router',
},

View file

@ -12,7 +12,7 @@ const metadata: Readonly<GuideMetadata> = Object.freeze({
path: 'packages/next-sample',
},
isFeatured: true,
fullTutorial: {
fullGuide: {
title: 'Full Next.js SDK tutorial',
url: 'https://docs.logto.io/sdk/next',
},

View file

@ -10,7 +10,7 @@ const metadata: Readonly<GuideMetadata> = Object.freeze({
repo: 'php',
path: 'samples',
},
fullTutorial: {
fullGuide: {
title: 'Full PHP SDK tutorial',
url: 'https://docs.logto.io/sdk/php',
},

View file

@ -10,7 +10,7 @@ const metadata: Readonly<GuideMetadata> = Object.freeze({
repo: 'python',
path: 'samples',
},
fullTutorial: {
fullGuide: {
title: 'Full Python SDK tutorial',
url: 'https://docs.logto.io/sdk/python',
},

View file

@ -6,18 +6,18 @@ import TextLink from '@/ds-components/TextLink';
import Step, { type Props as StepProps } from '../Step';
type Props = Omit<StepProps, 'children'> & {
fullTutorial: GuideMetadata['fullTutorial'];
fullGuide: GuideMetadata['fullGuide'];
};
function FurtherReadings(props: Props, ref?: Ref<HTMLDivElement>) {
const { fullTutorial, ...stepProps } = props;
const { fullGuide, ...stepProps } = props;
return (
<Step ref={ref} {...stepProps}>
<ul>
{fullTutorial && (
{fullGuide && (
<li>
<TextLink href={fullTutorial.url} targetBlank="noopener">
{fullTutorial.title}
<TextLink href={fullGuide.url} targetBlank="noopener">
{fullGuide.title}
</TextLink>
</li>
)}

View file

@ -41,8 +41,8 @@ export default function Steps({ children: reactChildren }: Props) {
const isApiResourceGuide = metadata.target === 'API';
const furtherReadings = useMemo(
() => <FurtherReadings title="Further readings" fullTutorial={metadata.fullTutorial} />,
[metadata.fullTutorial]
() => <FurtherReadings title="Further readings" fullGuide={metadata.fullGuide} />,
[metadata.fullGuide]
);
const children: Array<ReactElement<StepProps, typeof Step>> = useMemo(() => {
const steps = Array.isArray(reactChildren) ? reactChildren : [reactChildren];