Skip to content

Commit f97c60d

Browse files
committed
Fixes the schedules table pagination staying fixed to the bottom of the page
1 parent 6028ef3 commit f97c60d

File tree

1 file changed

+13
-2
lines changed
  • apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.schedules

1 file changed

+13
-2
lines changed

apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.schedules/route.tsx

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ import {
6565
import { useCurrentPlan } from "../_app.orgs.$organizationSlug/route";
6666
import { ArrowUpCircleIcon } from "@heroicons/react/24/outline";
6767
import { SimpleTooltip } from "~/components/primitives/Tooltip";
68+
import { cn } from "~/utils/cn";
6869

6970
export const loader = async ({ request, params }: LoaderFunctionArgs) => {
7071
const userId = await requireUserId(request);
@@ -210,9 +211,19 @@ export default function Page() {
210211
</div>
211212
</div>
212213

213-
<div className="h-fit max-h-full overflow-x-auto">
214+
<div
215+
className={cn(
216+
"grid h-fit max-h-full min-h-full overflow-x-auto",
217+
totalPages > 1 ? "grid-rows-[1fr_auto]" : "grid-rows-[1fr]"
218+
)}
219+
>
214220
<SchedulesTable schedules={schedules} hasFilters={hasFilters} />
215-
<div className="flex justify-end py-3">
221+
<div
222+
className={cn(
223+
"flex min-h-full",
224+
totalPages > 1 && "justify-end border-t border-grid-dimmed px-2 py-3"
225+
)}
226+
>
216227
<PaginationControls currentPage={currentPage} totalPages={totalPages} />
217228
</div>
218229
</div>

0 commit comments

Comments
 (0)