summaryrefslogtreecommitdiff
path: root/src/components/sidebars/TopologySidebarComponent.js
blob: 371463d1954832179dfa20253e71b116c36e2317 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import React from "react";
import BuildingSidebarContent from "./BuildingSidebarContent";
import Sidebar from "./Sidebar";

const TopologySidebarComponent = ({interactionLevel}) => {
    let sidebarHeading;
    let sidebarContent;

    switch (interactionLevel.mode) {
        case "BUILDING":
            sidebarHeading = "Building";
            sidebarContent = <BuildingSidebarContent/>;
            break;
        default:
            sidebarHeading = "Error";
            sidebarContent = "Missing Content";
    }

    return (
        <Sidebar isRight={true}>
            <h3>{sidebarHeading}</h3>
            {sidebarContent}
        </Sidebar>
    );
};

export default TopologySidebarComponent;