Search menu & mertic cards plan - #3
Open
Nick040791 wants to merge 23 commits into
Open
Conversation
- ran npm install assignment app and api - ran server.js and run dev - created project folder structure next - install react-router-dom - set up routing logic
-wrapped main.jsx in browser router -rendered navbar component then routes in app.jsx -imported react-router-dom modules in app.jsx and main.jsx
-created search context component -created constants component -created stats component
-added search provider to main -added elements to app jsx routes
completed search menu logic
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds client-side routing and a search feature powered by a React context/provider, plus a few shared utility modules.
Changes:
- Introduces
SearchContext+useSearchhook and wires provider into app bootstrap - Adds React Router pages/components (Home, Search, NotFound, Navbar) and routes
- Adds constants/stats utilities and updates dependencies
Reviewed changes
Copilot reviewed 13 out of 18 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| package.json | Adds top-level dependencies for Bootstrap and React Router |
| assignment-app/src/utils/stats.js | Adds helper functions for average/median/formatting |
| assignment-app/src/utils/constants.js | Adds filter options and metric field definitions |
| assignment-app/src/pages/SearchPage.jsx | Adds Search page wrapper rendering SearchMenu |
| assignment-app/src/pages/HomePage.jsx | Adds Home page content describing the dataset |
| assignment-app/src/main.jsx | Wraps app with BrowserRouter and SearchProvider |
| assignment-app/src/hooks/useSearch.jsx | Adds hook to consume SearchContext |
| assignment-app/src/context/SearchContext.jsx | Adds provider with search execution + persistence |
| assignment-app/src/components/SearchMenu.jsx | Adds search form UI and status rendering |
| assignment-app/src/components/NotFound.jsx | Adds 404 component |
| assignment-app/src/components/Navbar.jsx | Adds navbar links |
| assignment-app/src/App.jsx | Adds route definitions and navbar integration |
| assignment-app/package.json | Updates react-router-dom dependency version |
Files not reviewed (2)
- api/package-lock.json: Generated file
- assignment-app/package-lock.json: Generated file
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+37
to
+41
| useEffect(() => { | ||
| if (results.length > 0){ | ||
| localStorage.setItem('searchResults', JSON.stringify(results)); | ||
| } | ||
| }, [results]); |
Comment on lines
+53
to
+54
| {status === 'success' && (<p className="No records to display"></p>)} | ||
| {status === 'success' && (<p className="">Displaying {results.length.toLocalString('en-US')} Records</p>)} |
2. Fixed UseSearch SearchContext import
… SearchMenu causing blank page render, completed metric cards logic and stubborn USeMemo hook FINALLY
…strap css to button and cards
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.