Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions env.template.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
VITE_OPENSEARCH_URL="http://opensearch:9200"
VITE_OPENSEARCH_CREDENTIALS="admin:password"
VITE_OPENSEARCH_URL="https://opensearch.discovery.dor.lib.umich.edu"
VITE_OPENSEARCH_CREDENTIALS="admin:CHANGEME"
VITE_REACTIVESEARCH_URL="http://reactivesearch:8000"
VITE_REACTIVESEARCH_CREDENTIALS="admin:password"
VITE_SEARCH_PARSER_URL="http://search-parser:4567"
2 changes: 1 addition & 1 deletion eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import reactRefresh from 'eslint-plugin-react-refresh'
import { defineConfig, globalIgnores } from 'eslint/config'

export default defineConfig([
globalIgnores(['dist']),
globalIgnores(['dist', 'mlibrary_search_parser/**', 'search-parser-service/**']),
{
files: ['**/*.{js,jsx}'],
extends: [
Expand Down
7 changes: 6 additions & 1 deletion src/apps/OsDorDcApp/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,13 @@ function OsDorDcApp() {
const [loading, setLoading] = useState(false);
const [searchQuery, setSearchQuery] = useState("");
const [collectionFilter, setCollectionFilter] = useState(COLLECTION_OPTIONS.ALL);
// eslint-disable-next-line no-unused-vars
const [minPrice, setMinPrice] = useState(PRICE_RANGE.DEFAULT_MIN);
// eslint-disable-next-line no-unused-vars
const [maxPrice, setMaxPrice] = useState(PRICE_RANGE.DEFAULT_MAX);
// eslint-disable-next-line no-unused-vars
const [actualMinPrice, setActualMinPrice] = useState(PRICE_RANGE.DEFAULT_MIN);
// eslint-disable-next-line no-unused-vars
const [actualMaxPrice, setActualMaxPrice] = useState(PRICE_RANGE.DEFAULT_MAX);
const [error, setError] = useState(null);
const [connectionStatus, setConnectionStatus] = useState('checking');
Expand Down Expand Up @@ -86,7 +90,8 @@ function OsDorDcApp() {
if (actualMaxPrice > 0) {
fetchThings("", COLLECTION_OPTIONS.ALL, {min: actualMinPrice, max: actualMaxPrice});
}
}, [actualMaxPrice]); // Fetch things once we have price stats
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [actualMaxPrice]); // Fetch things once we have price stats (actualMinPrice intentionally omitted)

const handleSearch = () => {
fetchThings(searchQuery, collectionFilter, {min: minPrice, max: maxPrice});
Expand Down
1 change: 1 addition & 0 deletions src/apps/OsDorDcApp/services/openSearchService.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ export const getCollections = async () => {
// };
// };

// eslint-disable-next-line no-unused-vars
export const searchThings = async (query, collection, priceRange = null, size = 50) => {
// Build the base query
let queryObj;
Expand Down
Loading