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:
parent
07e145b903
commit
2c25a3eb4e
17 changed files with 23 additions and 23 deletions
|
@ -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',
|
||||
},
|
||||
|
|
|
@ -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',
|
||||
},
|
||||
|
|
|
@ -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',
|
||||
},
|
||||
|
|
|
@ -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',
|
||||
},
|
||||
|
|
|
@ -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',
|
||||
},
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
|
|
|
@ -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',
|
||||
},
|
||||
|
|
|
@ -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',
|
||||
},
|
||||
|
|
|
@ -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',
|
||||
},
|
||||
|
|
|
@ -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',
|
||||
},
|
||||
|
|
|
@ -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',
|
||||
},
|
||||
|
|
|
@ -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',
|
||||
},
|
||||
|
|
|
@ -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',
|
||||
},
|
||||
|
|
|
@ -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',
|
||||
},
|
||||
|
|
|
@ -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',
|
||||
},
|
||||
|
|
|
@ -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>
|
||||
)}
|
||||
|
|
|
@ -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];
|
||||
|
|
Loading…
Add table
Reference in a new issue