-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BI-9: Make a simple search bar #3
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
e58b6ec
search-bar feature added
meenalnimje 7987311
suggested changes added
meenalnimje 36cf4e0
2nd review
meenalnimje 6aa2e65
changes after 2nd review
meenalnimje f118309
merge commit fix
meenalnimje 6f391ae
prettier formate
meenalnimje 7e366c8
changes in stories
meenalnimje 58db507
export removed
meenalnimje dcb4c1c
suggested changes made
meenalnimje File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// The "use client" is used to declare a boundary between a Server and Client Component modules. | ||
// This means that by defining a "use client" in a file, all other modules imported into it, including child components, are considered part of the client bundle - and will be rendered by React on the client. | ||
// In this file useSearchParams is a client component. | ||
'use client' | ||
|
||
import jsonData from '../../../data/university_data' | ||
import { useSearchParams } from 'next/navigation' | ||
|
||
export default function Home() { | ||
const router = useSearchParams() | ||
const collegeList = jsonData | ||
const id = router.get('id') | ||
const selectedCollege = collegeList.find((item) => item.id === id) | ||
return ( | ||
<main className="flex min-h-screen flex-col items-center justify-center p-24"> | ||
<h1 className="text-5xl font-bold z-10">{selectedCollege?.name}</h1> | ||
</main> | ||
) | ||
} |
Empty file.
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm just leaving this comment over here, but it is unrelated to this code. There are some minor reasons due to which the build failed. We'll require a passing build to merge this code to the
main
branch.