AccountDetail (#107)

This commit is contained in:
Michael Quigley 2022-12-22 14:59:06 -05:00
parent 3856d6eb61
commit d8b73e1748
No known key found for this signature in database
GPG Key ID: 9B60314A9DD20A62
3 changed files with 15 additions and 1 deletions

View File

@ -71,7 +71,7 @@ const Console = (props) => {
selection={selection}
setSelection={setSelection}
/>
<Detail selection={selection} />
<Detail user={props.user} selection={selection} />
<Enable show={showEnableModal} onHide={closeEnableModal} token={props.user.token} />
<Version show={showVersionModal} onHide={closeVersionModal} />
</Container>

View File

@ -0,0 +1,9 @@
const AccountDetail = (props) => {
return (
<div>
<h2>Your Account: {props.user.email}</h2>
</div>
);
}
export default AccountDetail;

View File

@ -1,9 +1,14 @@
import EnvironmentDetail from "./EnvironmentDetail";
import AccountDetail from "./AccountDetail";
const Detail = (props) => {
let detailComponent = <h1>{props.selection.id} ({props.selection.type})</h1>;
switch(props.selection.type) {
case "account":
detailComponent = <AccountDetail user={props.user} />;
break;
case "environment":
detailComponent = <EnvironmentDetail selection={props.selection} />;
break;