Skip to content

Commit

Permalink
rename explore and learn more link functions
Browse files Browse the repository at this point in the history
  • Loading branch information
ElliotFriend committed Dec 20, 2024
1 parent 972fee7 commit 2bb70b2
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 77 deletions.
10 changes: 5 additions & 5 deletions src/components/Homepage/DeveloperResources/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { type ReactNode } from 'react'
import Heading from '@theme/Heading';
import Link from '@docusaurus/Link';
import clsx from 'clsx';
import { learnMoreLink, partitionBoxes, type NavigatingDocsItem as DeveloperResourcesItem } from '@site/src/components/Homepage/NavigatingTheDocs'
import { exploreLink, partitionBoxes, type NavigatingDocsItem as DeveloperResourcesItem } from '@site/src/components/Homepage/NavigatingTheDocs'
import Translate, { translate } from '@docusaurus/Translate'
import styles from './styles.module.css'

Expand All @@ -19,7 +19,7 @@ const DeveloperResourcesBoxes: DeveloperResourcesItem[] = [
Ask questions and engage with other Stellar devs.
</Translate>
),
link: learnMoreLink('https://discord.gg/st7Mxd58BV'),
link: exploreLink('https://discord.gg/st7Mxd58BV'),
},
{
title: translate({
Expand All @@ -33,7 +33,7 @@ const DeveloperResourcesBoxes: DeveloperResourcesItem[] = [
Get the latest news and insights about building on Stellar.
</Translate>
),
link: learnMoreLink('https://stellar.org/developers'),
link: exploreLink('https://stellar.org/developers'),
},
{
title: translate({
Expand All @@ -47,7 +47,7 @@ const DeveloperResourcesBoxes: DeveloperResourcesItem[] = [
A question and answer site for Stellar developers; if you can’t find what you’re looking for in the docs, try searching the Stack Exchange to see if your question has been addressed. If it hasn't, feel free to ask!
</Translate>
),
link: learnMoreLink('https://stellar.stackexchange.com/'),
link: exploreLink('https://stellar.stackexchange.com/'),
},
{
title: translate({
Expand All @@ -61,7 +61,7 @@ const DeveloperResourcesBoxes: DeveloperResourcesItem[] = [
Discuss Core Advancement Proposals (CAPs) and Stellar Ecosystem Proposals (SEPs), talk about the development of Stellar Core and Horizon, and stay informed about important network upgrades.
</Translate>
),
link: learnMoreLink('https://groups.google.com/g/stellar-dev'),
link: exploreLink('https://groups.google.com/g/stellar-dev'),
},
]

Expand Down
20 changes: 10 additions & 10 deletions src/components/Homepage/NavigatingTheDocs/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ export type NavigatingDocsItem = {
link: ReactNode;
}

export const learnMoreLink = (target: string) => (
export const exploreLink = (target: string) => (
<Link to={target}>
<Translate
id='component.Homepage.LearnMoreButton.Text'
description='The text that will be displayed on the "Learn more" buttons'>
id='component.Homepage.ExploreButton.Text'
description='The text that will be displayed on the "Explore" buttons'>
Explore
</Translate>
</Link>
Expand Down Expand Up @@ -43,7 +43,7 @@ const NavigatingDocsBoxes: NavigatingDocsItem[] = [
Contains tutorials and how-to guides for writing smart contracts, building applications, interacting with the network, and more.
</Translate>
),
link: learnMoreLink('/docs/build'),
link: exploreLink('/docs/build'),
},
{
title: translate({
Expand All @@ -57,7 +57,7 @@ const NavigatingDocsBoxes: NavigatingDocsItem[] = [
Find all informational and conceptual content here. Learn about Stellar fundamentals like how accounts and transactions function, dive deeper into the functionality of each operation, discover how fees work, and more.
</Translate>
),
link: learnMoreLink('/docs/learn/fundamentals'),
link: exploreLink('/docs/learn/fundamentals'),
},
{
title: translate({
Expand All @@ -71,7 +71,7 @@ const NavigatingDocsBoxes: NavigatingDocsItem[] = [
Information on how to issue assets on the Stellar network and create custom smart contract tokens.
</Translate>
),
link: learnMoreLink('/docs/tokens'),
link: exploreLink('/docs/tokens'),
},
{
title: translate({
Expand All @@ -85,7 +85,7 @@ const NavigatingDocsBoxes: NavigatingDocsItem[] = [
Discover various data availability options: RPC, Hubble, Horizon, Galexie, and data indexers.
</Translate>
),
link: learnMoreLink('/docs/data'),
link: exploreLink('/docs/data'),
},
{
title: translate({
Expand All @@ -99,7 +99,7 @@ const NavigatingDocsBoxes: NavigatingDocsItem[] = [
Learn about all the available tools for building on, interacting with, or just watching the Stellar network. Also, find information on how to use the Anchor Platform or Stellar Disbursement Platform.
</Translate>
),
link: learnMoreLink('/docs/tools'),
link: exploreLink('/docs/tools'),
},
{
title: translate({
Expand All @@ -113,7 +113,7 @@ const NavigatingDocsBoxes: NavigatingDocsItem[] = [
Information about deployed networks (Mainnet, Testnet, and Futurenet), current software versions, resource limitations, and fees.
</Translate>
),
link: learnMoreLink('/docs/networks'),
link: exploreLink('/docs/networks'),
},
{
title: translate({
Expand All @@ -127,7 +127,7 @@ const NavigatingDocsBoxes: NavigatingDocsItem[] = [
Everything you'll need to know if you want to run, operate, and maintain a core validator node on the Stellar network.
</Translate>
),
link: learnMoreLink('/docs/validators'),
link: exploreLink('/docs/validators'),
},
]

Expand Down
80 changes: 18 additions & 62 deletions src/components/Homepage/WayfindingBoxes/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@ type WayfindingItem = {
link: ReactNode;
}

export const learnMoreLink = (target: string) => (
<Link to={target}>
<Translate
id='component.Homepage.LearnMoreButton.Text'
description='The text that will be displayed on the "Learn More" buttons'>
LearnMore
</Translate>
</Link>
)

const WayfindingWays: WayfindingItem[] = [
{
title: translate({
Expand All @@ -26,16 +36,7 @@ const WayfindingWays: WayfindingItem[] = [
Issue an asset or create a custom smart contract token.
</Translate>
),
link: (
<Link
to="#asset-issuers">
<Translate
id='components.WayfindingBoxes.AssetIssuers.LinkText'
description='Button text for this "wayfinding box" on the homepage.'>
Learn more
</Translate>
</Link>
),
link: learnMoreLink("#asset-issuers"),
},
{
title: translate({
Expand All @@ -50,16 +51,7 @@ const WayfindingWays: WayfindingItem[] = [
Write smart contracts on the Stellar network.
</Translate>
),
link: (
<Link
to="#smart-contract-developers">
<Translate
id='components.WayfindingBoxes.SmartContractDevelopers.LinkText'
description='Button text for this "wayfinding box" on the homepage.'>
Learn more
</Translate>
</Link>
),
link: learnMoreLink("#smart-contract-developers"),
},
{
title: translate({
Expand All @@ -74,16 +66,7 @@ const WayfindingWays: WayfindingItem[] = [
Learn about and set up an anchor.
</Translate>
),
link: (
<Link
to="#ramps-anchors">
<Translate
id='components.WayfindingBoxes.RampsAnchors.LinkText'
description='Button text for this "wayfinding box" on the homepage.'>
Learn more
</Translate>
</Link>
),
link: learnMoreLink("#ramps-anchors"),
},
{
title: translate({
Expand All @@ -95,19 +78,10 @@ const WayfindingWays: WayfindingItem[] = [
<Translate
id='components.WayfindingBoxes.Applications.Description'
description='Short, punchy description for this "wayfinding box" on the homepage.'>
Build a traditional wallet, dapp, or list Stellar assets on an exchange.
Build a traditional wallet, dapp, or list Stellar assets on an exchange.
</Translate>
),
link: (
<Link
to="#applications">
<Translate
id='components.WayfindingBoxes.Applications.LinkText'
description='Button text for this "wayfinding box" on the homepage.'>
Learn more
</Translate>
</Link>
),
link: learnMoreLink("#applications"),
},
{
title: translate({
Expand All @@ -119,19 +93,10 @@ const WayfindingWays: WayfindingItem[] = [
<Translate
id='components.WayfindingBoxes.InfrastructureProviders.Description'
description='Short, punchy description for this "wayfinding box" on the homepage.'>
Set up a Horizon or RPC service.
Set up a Horizon or RPC service.
</Translate>
),
link: (
<Link
to="#infrastructure-providers">
<Translate
id='components.WayfindingBoxes.InfrastructureProviders.LinkText'
description='Button text for this "wayfinding box" on the homepage.'>
Learn more
</Translate>
</Link>
),
link: learnMoreLink("#infrastructure-providers"),
},
{
title: translate({
Expand All @@ -146,16 +111,7 @@ const WayfindingWays: WayfindingItem[] = [
Use Hubble to perform analysis on Stellar network data.
</Translate>
),
link: (
<Link
to="#analytics">
<Translate
id='components.WayfindingBoxes.Analytics.LinkText'
description='Button text for this "wayfinding box" on the homepage.'>
Learn more
</Translate>
</Link>
),
link: learnMoreLink("#analytics"),
},
];

Expand Down

0 comments on commit 2bb70b2

Please sign in to comment.