@@ -2,16 +2,12 @@ import { BookOpenIcon, PlusIcon } from "@heroicons/react/20/solid";
22import { Outlet , useParams , type MetaFunction } from "@remix-run/react" ;
33import { type LoaderFunctionArgs } from "@remix-run/server-runtime" ;
44import { tryCatch } from "@trigger.dev/core" ;
5- import { schedules } from "@trigger.dev/sdk" ;
65import { typedjson , useTypedLoaderData } from "remix-typedjson" ;
76import { z } from "zod" ;
87import { AdminDebugTooltip } from "~/components/admin/debugTooltip" ;
98import { BulkActionsNone } from "~/components/BlankStatePanels" ;
10- import { InlineCode } from "~/components/code/InlineCode" ;
11- import { EnvironmentCombo } from "~/components/environments/EnvironmentLabel" ;
129import { MainCenteredContainer , PageBody , PageContainer } from "~/components/layout/AppLayout" ;
1310import { LinkButton } from "~/components/primitives/Buttons" ;
14- import { TruncatedCopyableValue } from "~/components/primitives/TruncatedCopyableValue" ;
1511import { DateTime } from "~/components/primitives/DateTime" ;
1612import { NavBar , PageAccessories , PageTitle } from "~/components/primitives/PageHeader" ;
1713import { PaginationControls } from "~/components/primitives/Pagination" ;
@@ -30,21 +26,16 @@ import {
3026 TableHeaderCell ,
3127 TableRow ,
3228} from "~/components/primitives/Table" ;
29+ import { TruncatedCopyableValue } from "~/components/primitives/TruncatedCopyableValue" ;
3330import { BulkActionStatusCombo , BulkActionTypeCombo } from "~/components/runs/v3/BulkAction" ;
34- import { EnabledStatus } from "~/components/runs/v3/EnabledStatus" ;
35- import {
36- ScheduleTypeIcon ,
37- scheduleTypeName ,
38- ScheduleTypeCombo ,
39- } from "~/components/runs/v3/ScheduleType" ;
4031import { UserAvatar } from "~/components/UserProfilePhoto" ;
4132import { useEnvironment } from "~/hooks/useEnvironment" ;
4233import { useOrganization } from "~/hooks/useOrganizations" ;
4334import { useProject } from "~/hooks/useProject" ;
4435import { findProjectBySlug } from "~/models/project.server" ;
4536import { findEnvironmentBySlug } from "~/models/runtimeEnvironment.server" ;
4637import {
47- BulkActionListItem ,
38+ type BulkActionListItem ,
4839 BulkActionListPresenter ,
4940} from "~/presenters/v3/BulkActionListPresenter.server" ;
5041import { requireUserId } from "~/services/session.server" ;
@@ -54,7 +45,6 @@ import {
5445 EnvironmentParamSchema ,
5546 v3BulkActionPath ,
5647 v3CreateBulkActionPath ,
57- v3SchedulePath ,
5848} from "~/utils/pathBuilder" ;
5949
6050export const meta : MetaFunction = ( ) => {
@@ -154,20 +144,20 @@ export default function Page() {
154144 < div
155145 className = { cn (
156146 "grid max-h-full min-h-full overflow-x-auto" ,
157- totalPages > 1 ? "grid-rows-[auto_1fr_auto]" : "grid-rows-[auto_1fr ]"
147+ totalPages > 1 ? "grid-rows-[auto_1fr_auto]" : "grid-rows-[1fr ]"
158148 ) }
159149 >
160- < div className = "flex items-center justify-end gap-x-2 p-2" >
161- < div className = "flex items-center justify-end gap-x-2" >
150+ { totalPages > 1 && (
151+ < div className = "flex items-center justify-end gap-x-2 p-2 " >
162152 < PaginationControls
163153 currentPage = { currentPage }
164154 totalPages = { totalPages }
165155 showPageNumbers = { false }
166156 />
167157 </ div >
168- </ div >
158+ ) }
169159
170- < BulkActionsTable bulkActions = { bulkActions } />
160+ < BulkActionsTable bulkActions = { bulkActions } totalPages = { totalPages } />
171161 { totalPages > 1 && (
172162 < div
173163 className = { cn (
@@ -195,14 +185,20 @@ export default function Page() {
195185 ) ;
196186}
197187
198- function BulkActionsTable ( { bulkActions } : { bulkActions : BulkActionListItem [ ] } ) {
188+ function BulkActionsTable ( {
189+ bulkActions,
190+ totalPages,
191+ } : {
192+ bulkActions : BulkActionListItem [ ] ;
193+ totalPages : number ;
194+ } ) {
199195 const organization = useOrganization ( ) ;
200196 const project = useProject ( ) ;
201197 const environment = useEnvironment ( ) ;
202198 const { bulkActionParam } = useParams ( ) ;
203199
204200 return (
205- < Table >
201+ < Table containerClassName = { cn ( totalPages === 1 && "border-t-0" ) } >
206202 < TableHeader >
207203 < TableRow >
208204 < TableHeaderCell > ID</ TableHeaderCell >
0 commit comments