import * as React from 'react'; import { usePageSharedData, useTranslate } from '@portal/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 { 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')}
Fork and clone

Fork the xrpl-dev-portal repo. Using git, clone the fork to your computer.

Add to folder

Add your sample code to the content/_code-samples/ folder. Be sure to include a{' '} README.md that summarizes what it does and anything else people should know about it.

Commit and push

Commit your changes and push them to your fork on GitHub.

Open a pull request

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 */}
); }