Skip to content

Commit d2eafe0

Browse files
committed
Layout improvements
1 parent 16b9089 commit d2eafe0

3 files changed

Lines changed: 9 additions & 8 deletions

File tree

  • apps/webapp/app
    • components/errors
    • routes
      • _app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.errors._index
      • _app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.errors

apps/webapp/app/components/errors/ConfigureErrorAlerts.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ export function ConfigureErrorAlerts({
102102

103103
return (
104104
<div className="grid h-full grid-rows-[auto_1fr_auto] overflow-hidden">
105-
<div className="flex items-center justify-between border-b border-grid-bright px-4 py-3">
105+
<div className="flex items-center justify-between border-b border-grid-bright px-3 py-2">
106106
<Header2>Configure alerts</Header2>
107107
<LinkButton
108108
to={closeHref}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ export default function Page() {
196196
}, [location.search]);
197197

198198
return (
199-
<>
199+
<div className="grid h-full grid-rows-[auto_1fr] overflow-hidden">
200200
<NavBar>
201201
<PageTitle title="Errors" />
202202
<PageAccessories>
@@ -271,7 +271,7 @@ export default function Page() {
271271
</TypedAwait>
272272
</Suspense>
273273
</PageBody>
274-
</>
274+
</div>
275275
);
276276
}
277277

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

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { parse } from "@conform-to/zod";
2-
import { Outlet, useSearchParams } from "@remix-run/react";
2+
import { Outlet } from "@remix-run/react";
33
import { type ActionFunctionArgs, type LoaderFunctionArgs, json } from "@remix-run/server-runtime";
44
import { typedjson, useTypedLoaderData } from "remix-typedjson";
55
import { PageContainer } from "~/components/layout/AppLayout";
@@ -22,6 +22,7 @@ import {
2222
type CreateAlertChannelOptions,
2323
CreateAlertChannelService,
2424
} from "~/v3/services/alerts/createAlertChannel.server";
25+
import { useSearchParams } from "~/hooks/useSearchParam";
2526

2627
export const loader = async ({ request, params }: LoaderFunctionArgs) => {
2728
const userId = await requireUserId(request);
@@ -152,12 +153,12 @@ export const action = async ({ request, params }: ActionFunctionArgs) => {
152153

153154
export default function Page() {
154155
const { alertData, connectToSlackHref } = useTypedLoaderData<typeof loader>();
155-
const [searchParams] = useSearchParams();
156-
const showAlerts = searchParams.has("alerts");
156+
const { has } = useSearchParams();
157+
const showAlerts = has("alerts") ?? false;
157158

158159
return (
159-
<PageContainer>
160-
<ResizablePanelGroup orientation="horizontal" className="h-full overflow-hidden">
160+
<PageContainer className="grid-rows-[1fr]">
161+
<ResizablePanelGroup orientation="horizontal" className="h-full max-h-full overflow-hidden">
161162
<ResizablePanel id="errors-main" min="300px">
162163
<Outlet />
163164
</ResizablePanel>

0 commit comments

Comments
 (0)