| gio | 5f2f100 | 2025-03-20 18:38:48 +0400 | [diff] [blame] | 1 | import { NodeAppDetails } from "./node-app"; |
| 2 | import { NodeGatewayHttpsDetails } from "./node-gateway-https"; |
| 3 | import { AppNode } from "@/lib/state"; |
| 4 | import { NodeVolumeDetails } from "./node-volume"; |
| 5 | import { NodePostgreSQLDetails } from "./node-postgresql"; |
| 6 | import { NodeMongoDBDetails } from "./node-mongodb"; |
| 7 | import { NodeGithubDetails } from "./node-github"; |
| 8 | import { NodeGatewayTCPDetails } from "./node-gateway-tcp"; |
| 9 | |
| gio | d002661 | 2025-05-08 13:00:36 +0000 | [diff] [blame^] | 10 | export function NodeDetails(props: AppNode) { |
| 11 | switch (props.type) { |
| 12 | case "app": |
| 13 | return <NodeAppDetails {...props} />; |
| 14 | case "gateway-https": |
| 15 | return <NodeGatewayHttpsDetails {...props} />; |
| 16 | case "gateway-tcp": |
| 17 | return <NodeGatewayTCPDetails {...props} />; |
| 18 | case "volume": |
| 19 | return <NodeVolumeDetails {...props} />; |
| 20 | case "postgresql": |
| 21 | return <NodePostgreSQLDetails {...props} />; |
| 22 | case "mongodb": |
| 23 | return <NodeMongoDBDetails {...props} />; |
| 24 | case "github": |
| 25 | return <NodeGithubDetails {...props} />; |
| 26 | default: |
| 27 | return <>nooo</>; |
| 28 | } |
| 29 | } |