diff --git a/README.md b/README.md index 1c680f7..627d523 100644 --- a/README.md +++ b/README.md @@ -83,9 +83,9 @@ Dockerized and deployed on the Azure Web App Service after running the Python sc ### Testing -The Python script responsible for generating the SQLite database is tested using Python's built-in unit test module. To run the tests, run `python db_setup/test_db.py` or `npm run test_db`. +The Python script responsible for generating the SQLite database is tested using Python's built-in unit test module. To run the tests, run `python db_setup/test_db.py` or `npm run test-db`. -The Gin API is tested using Go tests. To run the tests, run `cd api && go test` or `npm run test_api`. +The Gin API is tested using Go tests. To run the tests, run `cd api && go test` or `npm run test-api`. ## Local Development diff --git a/api/db/utdgrades.db b/api/db/utdgrades.db index 73d92db..c35bf4d 100644 Binary files a/api/db/utdgrades.db and b/api/db/utdgrades.db differ diff --git a/src/components/Inputs.jsx b/src/components/Inputs.jsx index 7d129ac..be477f9 100644 --- a/src/components/Inputs.jsx +++ b/src/components/Inputs.jsx @@ -39,6 +39,7 @@ function Inputs({ setProfessor, setCourse, professor, course }) { suggestWhenEmpty={true} freeSolo={true} isLoading={professorLoading} + emptyState="Professor not found" onSelectOption={(value) => { setProfessor(value.item.label); autocompleteValues(value.item.label, course); @@ -72,7 +73,7 @@ function Inputs({ setProfessor, setCourse, professor, course }) { )} - {professorSuggestions.length > 0 && !professorLoading && ( + {!professorLoading && ( {professorSuggestions.map((professorOption, index) => ( @@ -90,6 +91,7 @@ function Inputs({ setProfessor, setCourse, professor, course }) { suggestWhenEmpty={true} freeSolo={true} isLoading={courseLoading} + emptyState={`Course(s) not found ${professor ? `for ${professor}` : ""}`} onSelectOption={(value) => setCourse(value.item.label)} > @@ -117,7 +119,7 @@ function Inputs({ setProfessor, setCourse, professor, course }) { )} - {courseSuggestions.length > 0 && !courseLoading && ( + {!courseLoading && ( {courseSuggestions.map((courseOption, index) => (