diff --git a/frontend/src/components/notebook/NotebookCreateBox.tsx b/frontend/src/components/notebook/NotebookCreateBox.tsx index 12a664b..5ee8c18 100644 --- a/frontend/src/components/notebook/NotebookCreateBox.tsx +++ b/frontend/src/components/notebook/NotebookCreateBox.tsx @@ -15,7 +15,7 @@ export interface NotebookCreateBoxProps { } -export function NotebookCreateBox({viewSet, resource}: NotebookCreateBoxProps): JSX.Element { +export function NotebookCreateBox({viewSet, resource}: NotebookCreateBoxProps): JSX.Element | null { const authorization = useAuthorizationContext() const project = useProjectContext() @@ -54,6 +54,15 @@ export function NotebookCreateBox({viewSet, resource}: NotebookCreateBoxProps): [viewSet, resource], ) + if(resource) { + if(resource.value.locked_by) { + return null + } + if(resource.value.is_running) { + return null + } + } + return (