-
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
#95 empty state search #96
Merged
+80
−15
Merged
Changes from 20 commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
1b3a492
Begin Rework Search Filter + Bar, Adjust Styles on Header
banushi-a 2760b33
Change Cycle/WorkModel to dropdowns + add search button since shi is …
banushi-a c1b3f1f
Search bar changes
banushi-a f0ea011
Lint...
banushi-a 87f9d61
Lint again..
banushi-a 4457b7e
No Results Component
banushi-a 82c0553
Merge branch 'main' into UpdateSearchBar
banushi-a a48d55d
Search Filters Populate Based on URL Search Params
banushi-a 4cd269e
Rishi micromanaging (jk)
banushi-a 403d423
Home page reroutes to roles
banushi-a 8ff6607
Merge main
banushi-a 50c597b
Merge
banushi-a b2aadc9
Loading Page Updates
banushi-a 045488f
Jank solution to reset select
banushi-a 82482e8
Lint
banushi-a 8df9768
Linting + Toast Issue
banushi-a e78e938
Merge
banushi-a 361a731
Merge main
banushi-a c13184b
Lint...
banushi-a 175ed2e
Prettier Fix
banushi-a 29e64e5
how to center a div?
banushi-a 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
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
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,16 @@ | ||
import Image from "next/image"; | ||
|
||
interface CooperLogoProps { | ||
width?: number; | ||
} | ||
|
||
export default function CooperLogo({ width }: CooperLogoProps) { | ||
return ( | ||
<Image | ||
src="/svg/hidingLogo.svg" | ||
width={width ?? 137} | ||
height={width ? width / 2.28 : 60} // 2.28 is the approximate ratio in the hidingLogo.svg file | ||
alt="Logo Picture" | ||
/> | ||
); | ||
} |
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,12 @@ | ||
import CooperLogo from "./cooper-logo"; | ||
|
||
export default function LoadingResults() { | ||
return ( | ||
<section className="flex h-[50dvh] w-full flex-col items-center justify-center"> | ||
<CooperLogo width={200} /> | ||
<div className="rounded-lg border-2 border-cooper-blue-600 px-16 pb-4 pt-6 text-xl font-bold text-cooper-blue-700"> | ||
<h2 className="">Loading ...</h2> | ||
</div> | ||
</section> | ||
); | ||
} |
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,33 @@ | ||
"use client"; | ||
|
||
import { usePathname, useRouter } from "next/navigation"; | ||
|
||
import { Button } from "@cooper/ui/button"; | ||
|
||
import CooperLogo from "./cooper-logo"; | ||
|
||
export default function NoResults() { | ||
const router = useRouter(); | ||
const pathname = usePathname(); | ||
|
||
function clearFilters() { | ||
router.push(pathname); | ||
} | ||
|
||
return ( | ||
<section className="flex h-[50dvh] w-full flex-col items-center justify-center"> | ||
<CooperLogo width={200} /> | ||
<div className="rounded-lg border-2 border-cooper-blue-600 px-16 pb-4 pt-6 text-xl font-bold"> | ||
<h2 className="text-cooper-blue-700">No Results Found</h2> | ||
<Button | ||
type="button" | ||
variant="ghost" | ||
onClick={clearFilters} | ||
className="text-cooper-blue-600" | ||
> | ||
Clear Filters | ||
</Button> | ||
Comment on lines
+22
to
+29
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This button might not be centered. See this There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. def not xD |
||
</div> | ||
</section> | ||
); | ||
} |
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.
Totally a nit but thoughts on doing this above the "main"
return
statement?So then you can remove all of the checks from Line 85.
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.
beautiful
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.
ok so i lied, if we do this then the search bar isn't rendered and adding it to the above return statements duplicates like an extra 15 lines of code so I think it might be better to leave where they are?
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.
you're right i didn't realize that this was a page and that we have the
SearchFilter
component on it