Skip to content
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

[Bug] Max height for filters #65

Merged
merged 5 commits into from
Sep 27, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions app/(main)/courses/[id]/@reviews/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ export default function Page({ params }: { params: { id: string } }) {
const results = data ? data[0] : null;
const items = data ? data.flatMap((d) => d.items) : [];
return (
<section className="mx-auto flex w-full max-w-content-width items-stretch gap-md px-md pb-lg">
<section className="mx-auto flex w-full max-w-content-width items-stretch gap-md px-md">
<div className="w-[250px] max-lg:hidden">
<div className="sticky top-0 flex min-h-[50dvh] w-full flex-col gap-sm pt-lg">
<div className="sticky top-0 flex max-h-[100dvh] min-h-[50dvh] w-full flex-col gap-sm overflow-y-auto pb-lg pt-lg">
<p className="pb-md">Filters</p>
<p className="pb-sm text-small-lg">Limit</p>
<FilterGroup
Expand All @@ -86,7 +86,7 @@ export default function Page({ params }: { params: { id: string } }) {
</div>
</div>
<SessionProvider>
<div className="flex flex-1 flex-col items-stretch gap-md pt-lg">
<div className="flex flex-1 flex-col items-stretch gap-md pb-lg pt-lg">
<p id="reviews">{results?.total_results ?? '-'} Review(s)</p>
{isLoading || isValidating ? <Skeleton /> : null}
{!isLoading && !isValidating
Expand Down
6 changes: 3 additions & 3 deletions app/(main)/courses/search/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ export default async function Page({
<div className="mx-auto w-full max-w-content-width px-md py-lg">
<p>Search results for &quot;{searchParams.query}&quot;</p>
</div>
<section className="mx-auto flex w-full max-w-content-width items-stretch gap-md px-md pb-lg">
<section className="mx-auto flex w-full max-w-content-width items-stretch gap-md px-md">
<div className="w-[250px] max-lg:hidden">
<div className="sticky top-0 flex min-h-[50dvh] w-full flex-col gap-sm pt-lg">
<div className="sticky top-0 flex max-h-[100dvh] min-h-[50dvh] w-full flex-col gap-sm overflow-y-auto pb-lg pt-lg">
<p className="pb-md">Filters</p>
<p className="pb-sm text-small-lg">Limit</p>
<FilterGroup
Expand Down Expand Up @@ -78,7 +78,7 @@ export default async function Page({
</LinkBtn>
</div>
</div>
<div className="flex flex-1 flex-col items-stretch gap-md pt-lg">
<div className="flex flex-1 flex-col items-stretch gap-md pb-lg pt-lg">
<p>{total_results ?? '-'} Courses(s)</p>

{items && total_results > 0 ? (
Expand Down
6 changes: 3 additions & 3 deletions app/(main)/professors/[id]/@reviews/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ export default function Page({ params }: { params: { id: string } }) {
const results = data ? data[0] : null;
const items = data ? data.flatMap((d) => d.items) : [];
return (
<section className="mx-auto flex w-full max-w-content-width items-stretch gap-md px-md pb-lg">
<section className="mx-auto flex w-full max-w-content-width items-stretch gap-md px-md">
<div className="w-[250px] max-lg:hidden">
<div className="sticky top-0 flex min-h-[50dvh] w-full flex-col gap-sm pt-lg">
<div className="sticky top-0 flex max-h-[100dvh] min-h-[50dvh] w-full flex-col gap-sm overflow-y-auto pb-lg pt-lg">
<p className="pb-md">Filters</p>
<p className="pb-sm text-small-lg">Limit</p>
<FilterGroup
Expand All @@ -87,7 +87,7 @@ export default function Page({ params }: { params: { id: string } }) {
</div>
</div>
<SessionProvider>
<div className="flex flex-1 flex-col items-stretch gap-md pt-lg">
<div className="flex flex-1 flex-col items-stretch gap-md pb-lg pt-lg">
<p id="reviews">{results?.total_results ?? '-'} Review(s)</p>
<form action="/professors/review" className="flex gap-sm">
<input type="hidden" name="professor_id" value={params.id} />
Expand Down
6 changes: 3 additions & 3 deletions app/(main)/professors/search/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ export default async function Page({
<div className="mx-auto w-full max-w-content-width px-md py-lg">
<p>Search results for &quot;{searchParams.query}&quot;</p>
</div>
<section className="mx-auto flex w-full max-w-content-width items-stretch gap-md px-md pb-lg">
<section className="mx-auto flex w-full max-w-content-width items-stretch gap-md px-md">
<div className="w-[250px] max-lg:hidden">
<div className="sticky top-0 flex min-h-[50dvh] w-full flex-col gap-sm pt-lg">
<div className="sticky top-0 flex max-h-[100dvh] min-h-[50dvh] w-full flex-col gap-sm overflow-y-auto pb-lg pt-lg">
<p className="pb-md">Filters</p>
<p className="pb-sm text-small-lg">Limit</p>
<FilterGroup
Expand All @@ -35,7 +35,7 @@ export default async function Page({
/>
</div>
</div>
<div className="flex flex-1 flex-col items-stretch gap-md pt-lg">
<div className="flex flex-1 flex-col items-stretch gap-md pb-lg pt-lg">
<p>{total_results ?? '-'} Professor(s)</p>

{items && total_results > 0 ? (
Expand Down
Loading