"use strict";

const React = require("react");
const defaultValue = require("default-value");

module.exports = function Command({ children, name }) {
	let commandName = defaultValue(name, children.trim());

	return (
		<a className="command" href={`/commands/${commandName}`}>
			{children}
		</a>
	);
};
