import {faBook} from "@fortawesome/free-solid-svg-icons" import {FontAwesomeIcon} from "@fortawesome/react-fontawesome" import {Box, BringAttention as B, Code, Form, Heading, Idiomatic as I} from "@steffo/bluelib-react" import * as React from "react" import {useCacheContext} from "../../contexts/cache" import {useNotebookContext} from "../../contexts/notebook" import {NotebookLabButton} from "./NotebookLabButton" import {NotebookLegacyButton} from "./NotebookLegacyButton" export function NotebookDescriptionBox(): JSX.Element | null { const cache = useCacheContext() const notebook = useNotebookContext() if(notebook) { var locked_by = cache?.getUserById(notebook.value.locked_by)?.value.username } const locked_text = React.useMemo( () => { if(!locked_by) { return null } return ( <>, currently locked by {locked_by} ) }, [locked_by], ) if(!notebook) { return null } return (  About {notebook.value.name}

A {notebook.value.is_running ? "running" : "stopped"} notebook using {notebook.value.container_image}{locked_text}.

) }