-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(resource-group-documentation): add list of documentation links
- Loading branch information
Showing
5 changed files
with
52 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"documentation": [ | ||
{ | ||
"name": "Bridges-2 Home Page", | ||
"documentationUri": "https://www.psc.edu/resources/bridges-2/" | ||
}, | ||
{ | ||
"name": "Bridges-2 User Guide", | ||
"documentationUri": "https://www.psc.edu/resources/bridges-2/user-guide/" | ||
} | ||
] | ||
} |
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,27 @@ | ||
import { useJSON } from "./utils"; | ||
|
||
import Section from "./section"; | ||
|
||
export default function ResourceGroupDocumentation({ | ||
baseUri, | ||
resourceGroupId, | ||
}) { | ||
const data = useJSON( | ||
`${baseUri}/api/resource-groups/${resourceGroupId}/documentation.json`, | ||
null | ||
); | ||
|
||
if (!data || data.error) return; | ||
|
||
return ( | ||
<Section title="Documentation" icon="book"> | ||
<ul> | ||
{data.documentation.map(({ name, documentationUri }) => ( | ||
<li> | ||
<a href={documentationUri}>{name}</a> | ||
</li> | ||
))} | ||
</ul> | ||
</Section> | ||
); | ||
} |