0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-09 22:22:41 +00:00

Change data items to a list

This commit is contained in:
G.Ambatte
2022-09-26 11:30:45 +13:00
parent 9a844dae39
commit d7b1f89152
2 changed files with 21 additions and 13 deletions

View File

@@ -40,18 +40,22 @@ const AccountPage = createClass({
renderUiItems : function() { renderUiItems : function() {
// console.log(this.props.uiItems); // console.log(this.props.uiItems);
return <> return [
<h1>Account Information <i className='fas fa-user'></i></h1> <>
<p><strong>Username: </strong> {this.props.uiItems.username || 'No user currently logged in'}</p> <h1>Account Information <i className='fas fa-user'></i></h1>
<p><strong>Last Login: </strong> {this.props.uiItems.issued.toString() || '-'}</p> <p><strong>Username: </strong> {this.props.uiItems.username || 'No user currently logged in'}</p>
<p></p> <p><strong>Last Login: </strong> {this.props.uiItems.issued.toString() || '-'}</p>
<h3>Homebrewery Information</h3> </>,
<p><strong>Brews on Homebrewery: </strong> {this.props.uiItems.mongoCount || '-'}</p> <>
<p></p> <h3>Homebrewery Information</h3>
<h3>Google Information <i className='fab fa-google-drive'></i></h3> <p><strong>Brews on Homebrewery: </strong> {this.props.uiItems.mongoCount || '-'}</p>
<p><strong>Linked to Google: </strong> {this.props.uiItems.googleId ? 'YES' : 'NO'}</p> </>,
{this.props.uiItems.googleId ? <p><strong>Brews on Google Drive: </strong> {this.props.uiItems.fileCount || '-'}</p> : '' } <>
</>; <h3>Google Information <i className='fab fa-google-drive'></i></h3>
<p><strong>Linked to Google: </strong> {this.props.uiItems.googleId ? 'YES' : 'NO'}</p>
{this.props.uiItems.googleId ? <p><strong>Brews on Google Drive: </strong> {this.props.uiItems.fileCount || '-'}</p> : '' }
</>
];
}, },
render : function(){ render : function(){

View File

@@ -39,7 +39,11 @@ const UIPage = createClass({
</Navbar> </Navbar>
<div className='content'> <div className='content'>
{this.props.renderUiItems()} {this.props.renderUiItems().map((item, index)=>{
return <div className='dataGroup' key={index}>
{item}
</div>;
})}
</div> </div>
</div>; </div>;
} }