-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* search-bar feature added * suggested changes added * 2nd review * merge commit fix * prettier formate * changes in stories * export removed * suggested changes made
- Loading branch information
1 parent
d2fbd21
commit e8176f6
Showing
10 changed files
with
5,531 additions
and
75 deletions.
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.