Skip to content

Commit

Permalink
Deploying version 2.1.2+1709334280
Browse files Browse the repository at this point in the history
  • Loading branch information
thedannywahl committed Mar 1, 2024
1 parent 1a91374 commit 64aec2b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
Binary file modified isp-site/.yarn/install-state.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion isp-site/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "isp-site",
"version": "2.1.2+1709323971",
"version": "2.1.2+1709334280",
"homepage": "https://inst.bid/#/",
"private": true,
"dependencies": {
Expand Down
9 changes: 6 additions & 3 deletions isp-site/src/routes/markdownBrand.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Modules
import React, { useState, useEffect } from "react";
import * as ReactDOM from "react-dom/client";
import Markdown from "react-markdown";
import remarkGfm from "remark-gfm";
import remarkGemoji from "remark-gemoji";
Expand All @@ -15,13 +15,15 @@ import { useParams } from "react-router-dom";
import strings from "strings/markdown";
import { getStrings, getLang } from "utils/langs";
import { Explorer } from "utils/explorer";
import { createPortal } from "react-dom";

// Page
export default function MarkdownBrand({ readme, brand }) {
const l = getLang(useParams().language);
const s = getStrings(strings, l);
const css = `.markdown .lang { display: none; } .markdown .lang.${l.toUpperCase()} { display: inherit; }`;
const md = readme;

const [content, setContent] = useState(`${s.loading}`);

useEffect(() => {
Expand All @@ -42,17 +44,19 @@ export default function MarkdownBrand({ readme, brand }) {

useEffect(() => {
const branches = document.querySelectorAll(".markdown .contents");

if (branches.length > 0) {
for (const branch of branches) {
Explorer(brand.toLowerCase(), branch, l).then((table) => {
ReactDOM.createRoot(branch).render(
createPortal(
<Markdown
children={table}
remarkPlugins={[remarkGfm, remarkGemoji]}
rehypePlugins={[rehypeRaw]}
allowedElements={allowedElements}
components={mdtoui}
/>,
branch,
);
});
}
Expand All @@ -71,7 +75,6 @@ export default function MarkdownBrand({ readme, brand }) {
margin="0 auto"
>
<style>{css}</style>

<View as="div" className="markdown">
<Markdown
children={content}
Expand Down

0 comments on commit 64aec2b

Please sign in to comment.