0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-26 18:12:40 +00:00

remove console logs and add forced space to brew count

This commit is contained in:
Víctor Losada Hernández
2024-05-23 13:18:07 +02:00
parent 133295c225
commit 72cb8e7db9
2 changed files with 22 additions and 5 deletions

View File

@@ -70,9 +70,8 @@ const ArchivePage = createClass({
},
loadPage: async function (page, update) {
console.log('running loadPage');
this.setState({ searching: true, error: null });
console.log('props: ',this.props.query.count, '| state: ', this.state.count, '| input: ', document.getElementById('count').value || 10);
const performSearch = async ({ title, count, v3, legacy }) => {
this.updateUrl(title, page, count, v3, legacy);
@@ -122,7 +121,6 @@ const ArchivePage = createClass({
},
loadTotal: async function () {
console.log('running loadTotal');
const {title, v3, legacy} = this.state;
this.setState({
@@ -397,11 +395,12 @@ const ArchivePage = createClass({
</div>
);
}
console.log('state when rendering ');
console.table(this.state);
return (
<div className="foundBrews">
<span className="totalBrews">
Brews found:
{`Brews found: `}
{title === '' ? '0' : this.state.totalBrews ? this.state.totalBrews : <span className="searchAnim"></span>}
</span>
{brewCollection.map((brew, index) => (

View File

@@ -144,6 +144,24 @@ body {
padding: 8px 10px;
z-index: 1000;
font-family: 'Open Sans';
.searchAnim {
position: relative;
display: inline-block;
width: 3ch;
height: 1em;
}
.searchAnim::after {
content: "";
width: max-content;
height: 1em;
position: absolute;
right: 0;
top: 50%;
translate: -50% -50%;
animation: trailingDots 2s ease infinite;
}
}
.brewItem {