mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-16 06:02:41 +00:00
rename 2
This commit is contained in:
@@ -49,16 +49,16 @@ const VaultPage = (props) => {
|
|||||||
setSearching(false);
|
setSearching(false);
|
||||||
};
|
};
|
||||||
|
|
||||||
const updateUrl = (title, author, count, v3, legacy, page) => {
|
const updateUrl = (titleValue, authorValue, countValue, v3Value, legacyValue, page) => {
|
||||||
const url = new URL(window.location.href);
|
const url = new URL(window.location.href);
|
||||||
const urlParams = new URLSearchParams();
|
const urlParams = new URLSearchParams();
|
||||||
|
|
||||||
Object.entries({
|
Object.entries({
|
||||||
title,
|
titleValue,
|
||||||
author,
|
authorValue,
|
||||||
count,
|
countValue,
|
||||||
v3,
|
v3Value,
|
||||||
legacy,
|
legacyValue,
|
||||||
page,
|
page,
|
||||||
}).forEach(([key, value]) => urlParams.set(key, value));
|
}).forEach(([key, value]) => urlParams.set(key, value));
|
||||||
|
|
||||||
@@ -68,7 +68,7 @@ const VaultPage = (props) => {
|
|||||||
|
|
||||||
const performSearch = async ({ titleValue, authorValue, countValue, v3Value, legacyValue, page }) => {
|
const performSearch = async ({ titleValue, authorValue, countValue, v3Value, legacyValue, page }) => {
|
||||||
updateUrl(titleValue, authorValue, countValue, v3Value, legacyValue, page);
|
updateUrl(titleValue, authorValue, countValue, v3Value, legacyValue, page);
|
||||||
console.log(title, author, count, v3, legacy);
|
console.log(titleValue, authorValue, countValue, v3Value, legacyValue);
|
||||||
if ((titleValue || authorValue) && (v3Value || legacyValue)) {
|
if ((titleValue || authorValue) && (v3Value || legacyValue)) {
|
||||||
const response = await request.get(
|
const response = await request.get(
|
||||||
`/api/vault?title=${titleValue}&author=${authorValue}&v3=${v3Value}&legacy=${legacyValue}&count=${countValue}&page=${page}`
|
`/api/vault?title=${titleValue}&author=${authorValue}&v3=${v3Value}&legacy=${legacyValue}&count=${countValue}&page=${page}`
|
||||||
|
|||||||
Reference in New Issue
Block a user