0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-28 07:02:38 +00:00

Add divs for styling of brewsAwaitingReview

This commit is contained in:
G.Ambatte
2024-06-08 19:59:01 +12:00
parent deef5998c5
commit 7830c7e2eb

View File

@@ -174,35 +174,42 @@ const LockTable = createClass({
render : function () { render : function () {
return <> return <>
<h2>{this.props.title}</h2> <div className='brewsAwaitingReview'>
<button onClick={this.clickFn}> <div className='brewBlock'>
<i className={`fas ${!this.state.searching ? 'fa-search' : 'fa-spin fa-spinner'}`} /> <h2>{this.props.title}</h2>
</button> <button onClick={this.clickFn}>
{this.state.result[this.props.resultName] && REFRESH
<> <i className={`fas ${!this.state.searching ? 'fa-search' : 'fa-spin fa-spinner'}`} />
<p>Total Reviews Waiting: {this.state.result[this.props.resultName].length}</p> </button>
<table className='lockTable'> </div>
<thead> {this.state.result[this.props.resultName] &&
<tr> <>
{this.props.propertyNames.map((name, idx)=>{ <p>Total Reviews Waiting: {this.state.result[this.props.resultName].length}</p>
return <th key={idx}>{name}</th>; <hr />
})} <p>Click a row to copy the Share ID to the clipboard</p>
</tr> <table className='lockTable'>
</thead> <thead>
<tbody> <tr>
{this.state.result[this.props.resultName].map((result, resultIdx)=>{ {this.props.propertyNames.map((name, idx)=>{
return <tr key={`${resultIdx}-row`} onClick={()=>{navigator.clipboard.writeText(result.shareId.toString());}}> return <th key={idx}>{name}</th>;
{this.props.propertyNames.map((name, nameIdx)=>{ })}
return <td key={`${resultIdx}-${nameIdx}`}> </tr>
{result[name].toString()} </thead>
</td>; <tbody>
})} {this.state.result[this.props.resultName].map((result, resultIdx)=>{
</tr>; return <tr key={`${resultIdx}-row`} onClick={()=>{navigator.clipboard.writeText(result.shareId.toString());}}>
})} {this.props.propertyNames.map((name, nameIdx)=>{
</tbody> return <td key={`${resultIdx}-${nameIdx}`}>
</table> {result[name].toString()}
</> </td>;
} })}
</tr>;
})}
</tbody>
</table>
</>
}
</div>
</>; </>;
} }
}); });