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

rename setPage to setPageState (match pageState name)

This commit is contained in:
Trevor Buckner
2024-09-03 23:55:54 -04:00
parent e3ef93f03a
commit ef201409d9

View File

@@ -16,7 +16,7 @@ const ErrorIndex = require('../errorPage/errors/errorIndex.js');
const request = require('../../utils/request-middleware.js'); const request = require('../../utils/request-middleware.js');
const VaultPage = (props) => { const VaultPage = (props) => {
const [pageState, setPage] = useState(parseInt(props.query.page) || 1); const [pageState, setPageState] = useState(parseInt(props.query.page) || 1);
//Response state //Response state
const [brewCollection, setBrewCollection] = useState(null); const [brewCollection, setBrewCollection] = useState(null);
@@ -39,7 +39,7 @@ const VaultPage = (props) => {
const updateStateWithBrews = (brews, page) => { const updateStateWithBrews = (brews, page) => {
setBrewCollection(brews || null); setBrewCollection(brews || null);
setPage(parseInt(page) || 1); setPageState(parseInt(page) || 1);
setSearching(false); setSearching(false);
}; };
@@ -110,7 +110,7 @@ const VaultPage = (props) => {
const legacyValue = legacyRef.current.checked != false; const legacyValue = legacyRef.current.checked != false;
if (update) { if (update) {
setPage(page); setPageState(page);
} }
// Perform search with the latest input values, because state is not fast enough // Perform search with the latest input values, because state is not fast enough