From 4063daf9172f0986a0f7c72bf495e31db7394e4f Mon Sep 17 00:00:00 2001 From: Ian Wagner Date: Sat, 21 Sep 2024 14:55:42 +0900 Subject: [PATCH] Refactor after discussion --- src/components/Doc.tsx | 8 ++++---- src/libs/field-spec-additional.ts | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/components/Doc.tsx b/src/components/Doc.tsx index 7d48ee16..8996a37e 100644 --- a/src/components/Doc.tsx +++ b/src/components/Doc.tsx @@ -19,7 +19,7 @@ type DocProps = { [key: string]: typeof headers } docUrl?: string, - docUrlDescription?: string + docUrlLinkText?: string } }; @@ -27,7 +27,7 @@ export default class Doc extends React.Component { render () { const {fieldSpec} = this.props; - const {doc, values, docUrl, docUrlDescription} = fieldSpec; + const {doc, values, docUrl, docUrlLinkText} = fieldSpec; const sdkSupport = fieldSpec['sdk-support']; const renderValues = ( @@ -87,9 +87,9 @@ export default class Doc extends React.Component { } - {docUrl && docUrlDescription && + {docUrl && docUrlLinkText &&
- {docUrlDescription} + {docUrlLinkText}
} diff --git a/src/libs/field-spec-additional.ts b/src/libs/field-spec-additional.ts index 25ce7bbd..57efa3f7 100644 --- a/src/libs/field-spec-additional.ts +++ b/src/libs/field-spec-additional.ts @@ -6,19 +6,19 @@ const spec = (t: TFunction) => ({ label: t("MapTiler Access Token"), doc: t("Public access token for MapTiler Cloud."), docUrl: "https://docs.maptiler.com/cloud/api/authentication-key/", - docUrlDescription: t("Learn More") + docUrlLinkText: t("Learn More") }, thunderforest_access_token: { label: t("Thunderforest Access Token"), doc: t("Public access token for Thunderforest services."), docUrl: "https://www.thunderforest.com/docs/apikeys/", - docUrlDescription: t("Learn More") + docUrlLinkText: t("Learn More") }, stadia_access_token: { label: t("Stadia Maps API Key"), doc: t("API key for Stadia Maps."), docUrl: "https://docs.stadiamaps.com/authentication/", - docUrlDescription: t("Learn More") + docUrlLinkText: t("Learn More") }, style_renderer: { label: t("Style Renderer"),