-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
disabled docs default access & now it's a link
- Loading branch information
Showing
8 changed files
with
240 additions
and
143 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import { marked } from "marked"; | ||
import MarkdownStyledLayout from "@/components/docs/MarkdownStyledLayout"; | ||
import { getHtmlContent, replaceLinkPlaceholders } from "@/utils/docs/docUtils"; | ||
import { useEffect, useState } from "react"; | ||
|
||
export type DocumentDisplayProps = { | ||
title?: string; | ||
content: string; | ||
}; | ||
|
||
const DocumentDisplay = ({ title, content }: DocumentDisplayProps) => { | ||
const htmlContent = getHtmlContent(content); | ||
const [stateContent, setContent] = useState<string>(""); | ||
useEffect(() => { | ||
if (typeof htmlContent === "string") { | ||
setContent(htmlContent); | ||
} | ||
// ensure it's Promise<string> | ||
if (typeof htmlContent === "object") { | ||
( | ||
htmlContent as unknown as { | ||
then: (arg0: (content: string) => void) => void; | ||
} | ||
).then((content) => setContent(content)); | ||
} | ||
}, [htmlContent]); | ||
const contentWithLinks = replaceLinkPlaceholders(stateContent); | ||
return ( | ||
<MarkdownStyledLayout | ||
style={{ width: "80%", padding: "20px", overflowY: "auto" }} | ||
> | ||
<MarkdownStyledLayout key={title}> | ||
<h1>{title || "Untitled Document"}</h1> | ||
<MarkdownStyledLayout | ||
dangerouslySetInnerHTML={{ __html: contentWithLinks.join("") }} | ||
/> | ||
</MarkdownStyledLayout> | ||
</MarkdownStyledLayout> | ||
); | ||
}; | ||
|
||
export default DocumentDisplay; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,112 +1,38 @@ | ||
import MarkdownStyledLayout from "@/components/doc/MarkdownStyledLayout"; | ||
import Link from "next/link"; | ||
|
||
export default function DocumentationPage() { | ||
const handleClick = () => { | ||
// Handle the navigation back to the site | ||
window.history.back(); | ||
}; | ||
|
||
export default function DocPage() { | ||
return ( | ||
<MarkdownStyledLayout> | ||
<h1 id="welcome-to-adamant-finance-documentation"> | ||
Welcome to Adamant Finance Documentation | ||
</h1> | ||
<p> | ||
Welcome to the central hub for all Adamant Finance technical | ||
documentation. Whether you are a developer, a stakeholder, or just | ||
curious about the inner workings of Adamant Finance, you'll find | ||
detailed documentation on our APIs, implementation procedures, and more. | ||
</p> | ||
<h2 id="what-you-will-find-here">What You Will Find Here</h2> | ||
<h3 id="api-documentation">API Documentation</h3> | ||
<p> | ||
Dive into the specifics of our API, exploring endpoints, responses, and | ||
detailed use cases. Our API documentation is structured to give you | ||
insights into how to integrate and utilize our systems efficiently. | ||
</p> | ||
<ul> | ||
<li> | ||
<a href="./api/calls-and-responses/Azure%20API/Overview"> | ||
Azure API Overview | ||
</a> | ||
</li> | ||
<li> | ||
<a href="./api/calls-and-responses/Azure%20API/Endpoint%20Detais"> | ||
Endpoint Details | ||
</a> | ||
</li> | ||
<li> | ||
<a href="./api/calls-and-responses/Azure%20API/Response%20Interfaces"> | ||
Response Interfaces | ||
</a> | ||
</li> | ||
</ul> | ||
<p>Explore other API resources:</p> | ||
<ul> | ||
<li> | ||
<a href="./api/calls-and-responses/24hr">24hr Volume</a> | ||
</li> | ||
<li> | ||
<a href="./api/calls-and-responses/config_mainnet.json"> | ||
Config Mainnet | ||
</a> | ||
</li> | ||
<li> | ||
<a href="./api/calls-and-responses/rewards">Rewards</a> | ||
</li> | ||
<li> | ||
<a href="./api/calls-and-responses/secret_tokens">Secret Tokens</a> | ||
</li> | ||
<li> | ||
<a href="./api/calls-and-responses/sefi_comment.json">Sefi Comment</a> | ||
</li> | ||
<li> | ||
<a href="./api/calls-and-responses/tokens">Tokens</a> | ||
</li> | ||
</ul> | ||
<h3 id="standard-operating-procedures-sop-"> | ||
Standard Operating Procedures (SOP) | ||
</h3> | ||
<p> | ||
For those looking to understand our operational frameworks and | ||
procedures: | ||
</p> | ||
<ul> | ||
<li> | ||
<a href="./SOP/Generating%20Typescript%20interfaces%20from%20JSON"> | ||
Generating TypeScript Interfaces from JSON | ||
</a> | ||
</li> | ||
<li> | ||
<a href="./SOP/Setting%20up%20json-to-ts%20cli"> | ||
Setting up JSON-to-TS CLI | ||
</a> | ||
</li> | ||
</ul> | ||
<h3 id="miscellaneous-resources">Miscellaneous Resources</h3> | ||
<ul> | ||
<li> | ||
<a href="./SecretSwap%20icons">SecretSwap Icons</a> | ||
</li> | ||
</ul> | ||
<h2 id="getting-started">Getting Started</h2> | ||
<p> | ||
To get started with our documentation, we recommend reading the{" "} | ||
<a href="./api/calls-and-responses/Azure%20API/Overview"> | ||
Azure API Overview | ||
</a>{" "} | ||
as it provides a comprehensive introduction to the capabilities and | ||
design of our financial APIs. | ||
</p> | ||
<p> | ||
Feel free to navigate through the sections using the links provided in | ||
each document. Each section is designed to be standalone, allowing you | ||
to jump directly to the information you need. | ||
</p> | ||
<h2 id="feedback">Feedback</h2> | ||
<p> | ||
Your feedback is important to us. If you have comments or questions, | ||
please feel free to reach out to us at{" "} | ||
<a href="mailto:[email protected]">[email protected]</a>. We are | ||
committed to continuously improving our documentation to better serve | ||
your needs. | ||
</p> | ||
<p>Thank you for choosing Adamant Finance. Happy exploring!</p> | ||
</MarkdownStyledLayout> | ||
<div className="bg-tubeshapes-dark dark:bg-tubeshapes-light bg-cover min-h-screen flex flex-col justify-center items-center w-full"> | ||
<div className="text-center p-8 max-w-2xl bg-adamant-app-box rounded-lg shadow-lg"> | ||
<h1 className="text-2xl font-bold text-white mb-4"> | ||
Developer Documentation | ||
</h1> | ||
<p className="text-gray-400 mb-6"> | ||
Access all the necessary documentation for developing on the AdamantFi | ||
platform. | ||
</p> | ||
<div className="flex gap-2"> | ||
<button | ||
onClick={handleClick} | ||
className="bg-adamant-box-buttonDark hover:bg-adamant-box-buttonLight text-white font-bold py-2 px-4 rounded transition-colors duration-300 flex-1" | ||
> | ||
Back to Site | ||
</button> | ||
<Link | ||
href="https://github.com/dredshep/AdamantFiSite/tree/main/docs" | ||
className="inline-block bg-adamant-gradientBright hover:bg-adamant-gradientDark text-white font-bold py-2 px-4 rounded transition-colors duration-300 flex-1" | ||
target="_blank" | ||
referrerPolicy="no-referrer" | ||
> | ||
Go to Documentation | ||
</Link> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
import MarkdownStyledLayout from "@/components/docs/MarkdownStyledLayout"; | ||
import Link from "next/link"; | ||
|
||
export default function DocPage() { | ||
return ( | ||
<MarkdownStyledLayout> | ||
<h1 id="welcome-to-adamant-finance-documentation"> | ||
Welcome to Adamant Finance Documentation | ||
</h1> | ||
<p> | ||
Welcome to the central hub for all Adamant Finance technical | ||
documentation. Whether you are a developer, a stakeholder, or just | ||
curious about the inner workings of Adamant Finance, you'll find | ||
detailed documentation on our APIs, implementation procedures, and more. | ||
</p> | ||
<h2 id="what-you-will-find-here">What You Will Find Here</h2> | ||
<h3 id="api-documentation">API Documentation</h3> | ||
<p> | ||
Dive into the specifics of our API, exploring endpoints, responses, and | ||
detailed use cases. Our API documentation is structured to give you | ||
insights into how to integrate and utilize our systems efficiently. | ||
</p> | ||
<ul> | ||
<li> | ||
<Link href="./docs/api/calls-and-responses/Azure%20API/Overview"> | ||
Azure API Overview | ||
</Link> | ||
</li> | ||
<li> | ||
<Link href="./docs/api/calls-and-responses/Azure%20API/Endpoint%20Detais"> | ||
Endpoint Details | ||
</Link> | ||
</li> | ||
<li> | ||
<Link href="./docs/api/calls-and-responses/Azure%20API/Response%20Interfaces"> | ||
Response Interfaces | ||
</Link> | ||
</li> | ||
</ul> | ||
<p>Explore other API resources:</p> | ||
<ul> | ||
<li> | ||
<Link href="./docs/api/calls-and-responses/24hr">24hr Volume</Link> | ||
</li> | ||
<li> | ||
<Link href="./docs/api/calls-and-responses/config_mainnet.json"> | ||
Config Mainnet | ||
</Link> | ||
</li> | ||
<li> | ||
<Link href="./docs/api/calls-and-responses/rewards">Rewards</Link> | ||
</li> | ||
<li> | ||
<Link href="./docs/api/calls-and-responses/secret_tokens"> | ||
Secret Tokens | ||
</Link> | ||
</li> | ||
<li> | ||
<Link href="./docs/api/calls-and-responses/sefi_comment.json"> | ||
Sefi Comment | ||
</Link> | ||
</li> | ||
<li> | ||
<Link href="./docs/api/calls-and-responses/tokens">Tokens</Link> | ||
</li> | ||
</ul> | ||
<h3 id="standard-operating-procedures-sop-"> | ||
Standard Operating Procedures (SOP) | ||
</h3> | ||
<p> | ||
For those looking to understand our operational frameworks and | ||
procedures: | ||
</p> | ||
<ul> | ||
<li> | ||
<Link href="./docs/SOP/Generating%20Typescript%20interfaces%20from%20JSON"> | ||
Generating TypeScript Interfaces from JSON | ||
</Link> | ||
</li> | ||
<li> | ||
<Link href="./docs/SOP/Setting%20up%20json-to-ts%20cli"> | ||
Setting up JSON-to-TS CLI | ||
</Link> | ||
</li> | ||
</ul> | ||
<h3 id="miscellaneous-resources">Miscellaneous Resources</h3> | ||
<ul> | ||
<li> | ||
<Link href="./docs/SecretSwap%20icons">SecretSwap Icons</Link> | ||
</li> | ||
</ul> | ||
<h2 id="getting-started">Getting Started</h2> | ||
<p> | ||
To get started with our documentation, we recommend reading the{" "} | ||
<Link href="./docs/api/calls-and-responses/Azure%20API/Overview"> | ||
Azure API Overview | ||
</Link>{" "} | ||
as it provides a comprehensive introduction to the capabilities and | ||
design of our financial APIs. | ||
</p> | ||
<p> | ||
Feel free to navigate through the sections using the links provided in | ||
each document. Each section is designed to be standalone, allowing you | ||
to jump directly to the information you need. | ||
</p> | ||
<h2 id="feedback">Feedback</h2> | ||
<p> | ||
Your feedback is important to us. If you have comments or questions, | ||
please feel free to reach out to us at{" "} | ||
<Link href="mailto:[email protected]">[email protected]</Link>. | ||
We are committed to continuously improving our documentation to better | ||
serve your needs. | ||
</p> | ||
<p>Thank you for choosing Adamant Finance. Happy exploring!</p> | ||
</MarkdownStyledLayout> | ||
); | ||
} |
Oops, something went wrong.