0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-28 02:42:39 +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() {
// console.log(this.props.uiItems);
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>
<p><strong>Last Login: </strong> {this.props.uiItems.issued.toString() || '-'}</p>
<p></p>
<h3>Homebrewery Information</h3>
<p><strong>Brews on Homebrewery: </strong> {this.props.uiItems.mongoCount || '-'}</p>
<p></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> : '' }
</>;
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>
<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>
</>,
<>
<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(){

View File

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