1
Fork 0
mirror of https://github.com/Steffo99/sophon.git synced 2024-12-22 23:04:21 +00:00
sophon/frontend/src/components/instance/InstanceDescriptionBox.tsx
Stefano Pigozzi b44f7b4ebf 💥 Dockerize everything! (#74 closes #59)
*  Create Dockerfile for the backend

* 🔧 Limit the allowed slug values

*  Create docker image for the proxy

*  Add serve script (and serve dependency)

*  Add .dockerignore symlinks to .gitignore

*  Create docker image for the frontend

* 🔧 Proxy the frontend

* 🔧 Configure the proxy.dbm directory

* 🚧 WIP

* 💥 Improve settings handling

* 💥 Prepare backend for docker deployment

* 🔧 Reserve `static` notebook slug

*  Make static work

* 🐛 Set a default value for reduce

* 💥 Things

* 💥 Everything works!
2021-10-19 22:41:18 +02:00

26 lines
756 B
TypeScript

import {faUniversity} from "@fortawesome/free-solid-svg-icons"
import * as React from "react"
import {useInstanceContext} from "../../contexts/instance"
import {DescriptionBox} from "../elements/DescriptionBox"
import {ErrorBox} from "../errors/ErrorBox"
export function InstanceDescriptionBox(): JSX.Element | null {
const instance = useInstanceContext()
if(!instance) {
return <ErrorBox error={new Error("This component is being rendered outside an InstanceContext.")}/>
}
if(!instance.state.details) {
return null
}
return (
<DescriptionBox
icon={faUniversity}
name={instance.state.details.name}
description={instance.state.details.description}
/>
)
}