import * as React from 'react'; import { useThemeHooks } from '@redocly/theme/core/hooks'; export const frontmatter = { seo: { title: 'Code Samples', description: "Browse sample code for building common use cases on the XRP Ledger.", } }; const langIcons = { cli: require('../static/img/logos/cli.svg'), go: require('../static/img/logos/golang.svg'), http: require('../static/img/logos/globe.svg'), java: require('../static/img/logos/java.svg'), js: require('../static/img/logos/javascript.svg'), php: require('../static/img/logos/php.svg'), py: require('../static/img/logos/python.svg'), ts: require('../static/img/logos/typescript.svg'), }; const target = { github_forkurl: 'https://github.com/XRPLF/xrpl-dev-portal', github_branch: 'master', }; export default function CodeSamples() { const { useTranslate, usePageSharedData } = useThemeHooks(); const { translate } = useTranslate(); const { codeSamples, langs } = usePageSharedData('code-samples'); return (

{translate('Start Building with Example Code')}

{translate('Code Samples')}
{/* Submit Code Samples */}
orange waves

{translate('Browse sample code for building common use cases on the XRP Ledger')}

{translate('Contribute Code Samples')}

{translate('Help the XRPL community by submitting your own code samples')}
{translate('Fork and clone')}

{translate('resources.contribute.1.part1', 'Fork the ')} {translate('resources.contribute.1.part2', 'xrpl-dev-portal repo')} {translate('resources.contribute.1.part3', '. Using git, clone the fork to your computer.')}

{translate('Add to folder')}

{translate('resources.contribute.2.part1', 'Add your sample code to the ')} content/_code-samples/ {translate('resources.contribute.2.part2', ' folder. Be sure to include a ')} README.md {translate('resources.contribute.2.part3', 'that summarizes what it does and anything else people should know about it.')}

{translate('Commit and push')}

{translate('resources.contribute.3.part1', 'Commit your changes and push them to your fork on GitHub.')}

{translate('Open a pull request')}

{translate('resources.contribute.4.part1', "Open a pull request to the original repo. Maintainers will review your submission and suggest changes if necessary. If the code sample is helpful, it'll be merged and added to XRPL.org!")}

{/* Submit Code Samples */}
); }