Refactor ShowConvertedCompose component: simplify conditional rendering of the compose file display by removing unnecessary null check and ensuring consistent layout.

This commit is contained in:
Mauricio Siu 2025-03-29 15:01:55 -06:00
parent d793c6a2ec
commit 17a859d26d

View File

@ -88,21 +88,14 @@ export const ShowConvertedCompose = ({ composeId }: Props) => {
</Button> </Button>
</div> </div>
{compose !== null ? ( <pre>
<pre> <CodeEditor
<CodeEditor value={compose || ""}
value={compose || ""} language="yaml"
language="yaml" readOnly
readOnly height="50rem"
height="50rem" />
/> </pre>
</pre>
) : (
<div className="py-4 text-center text-muted-foreground">
No compose file available. Make sure at least one domain is
configured for this project.
</div>
)}
</DialogContent> </DialogContent>
</Dialog> </Dialog>
); );