a70e68c7bd
* Smolmix documentation * Add smolmix docs: landing page, tutorials, and developer page links * Add Exit Gateway services page (NR vs IPR) and link from existing docs * Update auto-generated command and API outputs * Reorg of tutorials and architecture pages * License information + remove TODO from docs.rs visibile comment + reorg readme * Add versions file for doc-wide versioning * Relative -> absolute links * Relative -> absolute links * Update license + add old tutorial code as examples * Streamline smolmix docs * Clippy * Clean up doc comments * Last pass * Add larger file download to list * set new versions * Clippy * Remove blake pin from docs + add version range to root Cargo.toml * Format example logging * Remove crate blocked component * Loose whitespace * Add doc verification script for inline mdx * Formatting * Components regen * Reorg + tighten text * Voicing cohesion pass + remove bloated examples * Voicing cont. * Reduce max download size * Small suggested clarifications * Max/docs voicing consistency (#6769) * Reduce max download size * voicing consistency across docs * New landing order w smolmix * Tweaks * Final tweaks
36 lines
998 B
TypeScript
36 lines
998 B
TypeScript
import { Callout } from "nextra/components";
|
|
import { NYM_SDK_VERSION, SMOLMIX_VERSION } from "./versions";
|
|
|
|
const VERSIONS: Record<string, string> = {
|
|
"nym-sdk": NYM_SDK_VERSION,
|
|
smolmix: SMOLMIX_VERSION,
|
|
};
|
|
|
|
const EXAMPLES_URLS: Record<string, string> = {
|
|
"nym-sdk":
|
|
"https://github.com/nymtech/nym/tree/develop/sdk/rust/nym-sdk/examples",
|
|
smolmix:
|
|
"https://github.com/nymtech/nym/tree/develop/smolmix/core/examples",
|
|
};
|
|
|
|
interface CodeVerifiedProps {
|
|
/** Crate name to display. Defaults to "nym-sdk". */
|
|
crate?: keyof typeof VERSIONS;
|
|
}
|
|
|
|
export const CodeVerified = ({ crate: crateName = "nym-sdk" }: CodeVerifiedProps) => (
|
|
<Callout type="info">
|
|
Code verified against{" "}
|
|
<code>{crateName}</code> v{VERSIONS[crateName]}. If the API has changed
|
|
since then, check the{" "}
|
|
<a
|
|
href={EXAMPLES_URLS[crateName]}
|
|
target="_blank"
|
|
rel="noopener noreferrer"
|
|
>
|
|
examples in the repo
|
|
</a>{" "}
|
|
for the latest usage.
|
|
</Callout>
|
|
);
|