Skip to content

Commit 86a98e2

Browse files
committed
Fix positioning issue of the pagination pane in the deployments page
1 parent 81ca16c commit 86a98e2

File tree

1 file changed

+11
-5
lines changed
  • apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.deployments

1 file changed

+11
-5
lines changed

apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.deployments/route.tsx

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ import {
5252
} from "~/presenters/v3/DeploymentListPresenter.server";
5353
import { requireUserId } from "~/services/session.server";
5454
import { titleCase } from "~/utils";
55+
import { cn } from "~/utils/cn";
5556
import { EnvironmentParamSchema, docsPath, v3DeploymentPath } from "~/utils/pathBuilder";
5657
import { createSearchParams } from "~/utils/searchParams";
5758
import { BranchTrackingConfigSchema, getTrackedBranchForEnvironment } from "~/v3/github";
@@ -170,8 +171,8 @@ export default function Page() {
170171
<ResizablePanelGroup orientation="horizontal" className="h-full max-h-full">
171172
<ResizablePanel id="deployments-main" min="100px" className="max-h-full">
172173
{hasDeployments ? (
173-
<div className="grid max-h-full grid-rows-[1fr_auto]">
174-
<Table containerClassName="border-t-0">
174+
<div className="flex h-full max-h-full flex-col">
175+
<Table containerClassName="border-t-0 grow">
175176
<TableHeader>
176177
<TableRow>
177178
<TableHeaderCell>Deploy</TableHeaderCell>
@@ -296,9 +297,14 @@ export default function Page() {
296297
)}
297298
</TableBody>
298299
</Table>
299-
<div className="-mt-px flex justify-between gap-2 border-t border-grid-dimmed px-2 py-2">
300+
<div
301+
className={cn(
302+
"-mt-px flex flex-wrap justify-end gap-2 border-t border-grid-dimmed px-3 pb-[7px] pt-[6px]",
303+
connectedGithubRepository && environmentGitHubBranch && "justify-between"
304+
)}
305+
>
300306
{connectedGithubRepository && environmentGitHubBranch && (
301-
<div className="flex flex-nowrap items-center gap-2 whitespace-nowrap text-sm">
307+
<div className="flex flex-nowrap items-center gap-2 whitespace-nowrap py-0.5 text-sm">
302308
<OctoKitty className="size-4" />
303309
Automatically triggered by pushes to{" "}
304310
<div className="flex max-w-32 items-center gap-1 truncate rounded bg-grid-dimmed px-1 font-mono">
@@ -315,7 +321,7 @@ export default function Page() {
315321
</a>
316322
</div>
317323
)}
318-
<PaginationControls currentPage={currentPage} totalPages={20} />
324+
<PaginationControls currentPage={currentPage} totalPages={totalPages} />
319325
</div>
320326
</div>
321327
) : environment.type === "DEVELOPMENT" ? (

0 commit comments

Comments
 (0)