-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
📚 docs: Enable ERDs for 10 top sources. (#45085)
- Loading branch information
1 parent
a8e3837
commit f216a60
Showing
14 changed files
with
71 additions
and
0 deletions.
There are no files selected for viewing
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
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
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
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
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
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,29 @@ | ||
import React, { useEffect, useState } from "react"; | ||
import erdBG from "../../static/img/erd-bg-cta.jpg"; | ||
import styles from "./EntityRelationshipDiagram.module.css"; | ||
const { getRegistryEntry } = require("../remark/utils"); | ||
const { getFromPaths } = require("../helpers/objects"); | ||
|
||
export const EntityRelationshipDiagram = ({}) => { | ||
const [erdUrl, setErdUrl] = useState(null); | ||
|
||
useEffect(() => { | ||
async function getErdUrl() { | ||
const entry = await getRegistryEntry({ path: window.location.pathname }); | ||
const url = getFromPaths(entry, "erdUrl_[oss|cloud]"); | ||
setErdUrl(url); | ||
} | ||
|
||
getErdUrl(); | ||
}, []); | ||
|
||
if (!erdUrl) return null; | ||
|
||
return ( | ||
<div className={styles.entityRelatonshipdDiagram}> | ||
<a href={erdUrl} target="_blank"> | ||
<img src={erdBG} /> | ||
</a> | ||
</div> | ||
); | ||
}; |
7 changes: 7 additions & 0 deletions
7
docusaurus/src/components/EntityRelationshipDiagram.module.css
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,7 @@ | ||
.entityRelatonshipdDiagram { | ||
width: 100%; | ||
} | ||
.entityRelatonshipdDiagram img { | ||
width: 100%; | ||
height: auto; | ||
} |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.