Skip to content

Commit cb3f598

Browse files
authored
Merge branch 'main' into Update-flattenAttributes
2 parents c908f3a + c31700a commit cb3f598

File tree

10 files changed

+196
-159
lines changed

10 files changed

+196
-159
lines changed

.changeset/cuddly-pugs-begin.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"trigger.dev": patch
3+
---
4+
5+
Fix issue with prisma extension breaking deploy builds

apps/webapp/app/components/ErrorDisplay.tsx

Lines changed: 31 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1+
import { HomeIcon } from "@heroicons/react/20/solid";
12
import { isRouteErrorResponse, useRouteError } from "@remix-run/react";
2-
import { LinkButton } from "./primitives/Buttons";
3-
import { Header1, Header3 } from "./primitives/Headers";
3+
import { motion } from "framer-motion";
44
import { friendlyErrorDisplay } from "~/utils/httpErrors";
5+
import { LinkButton } from "./primitives/Buttons";
6+
import { Header1 } from "./primitives/Headers";
7+
import { Paragraph } from "./primitives/Paragraph";
58

69
type ErrorDisplayOptions = {
710
button?: {
@@ -39,12 +42,32 @@ type DisplayOptionsProps = {
3942

4043
export function ErrorDisplay({ title, message, button }: DisplayOptionsProps) {
4144
return (
42-
<div className="p-4">
43-
<Header1 className="mb-4 border-b border-charcoal-800 pb-4">{title}</Header1>
44-
{message && <Header3>{message}</Header3>}
45-
<LinkButton to={button ? button.to : "/"} variant="primary/medium" className="mt-8">
46-
{button ? button.title : "Home"}
47-
</LinkButton>
45+
<div className="relative flex min-h-screen flex-col items-center justify-center bg-[#16181C]">
46+
<div className="z-10 mt-[30vh] flex flex-col items-center gap-8">
47+
<Header1>{title}</Header1>
48+
{message && <Paragraph>{message}</Paragraph>}
49+
<LinkButton
50+
to={button ? button.to : "/"}
51+
shortcut={{ modifiers: ["meta"], key: "g" }}
52+
variant="primary/medium"
53+
LeadingIcon={HomeIcon}
54+
>
55+
{button ? button.title : "Go to homepage"}
56+
</LinkButton>
57+
</div>
58+
<div className="pointer-events-none absolute bottom-4 right-4 z-10 h-[70px] w-[200px] bg-[rgb(24,26,30)]" />
59+
<motion.div
60+
className="pointer-events-none absolute inset-0 overflow-hidden"
61+
initial={{ opacity: 0 }}
62+
animate={{ opacity: 1 }}
63+
transition={{ delay: 0.5, duration: 2, ease: "easeOut" }}
64+
>
65+
<iframe
66+
src="https://my.spline.design/untitled-a6f70b5ebc46bdb2dcc0f21d5397e8ac/"
67+
className="pointer-events-none absolute inset-0 h-full w-full object-cover"
68+
style={{ border: "none" }}
69+
/>
70+
</motion.div>
4871
</div>
4972
);
5073
}

apps/webapp/app/routes/_app.orgs.$organizationSlug/route.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,6 @@ export function ErrorBoundary() {
127127
return org ? (
128128
<RouteErrorDisplay button={{ title: org.title, to: organizationPath(org) }} />
129129
) : (
130-
<RouteErrorDisplay button={{ title: "Home", to: "/" }} />
130+
<RouteErrorDisplay button={{ title: "Go to homepage", to: "/" }} />
131131
);
132132
}

apps/webapp/app/routes/resources.orgs.$organizationSlug.projects.$projectParam.schedules.new/route.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ import { CronPattern, UpsertSchedule } from "~/v3/schedules";
4444
import { UpsertTaskScheduleService } from "~/v3/services/upsertTaskSchedule.server";
4545
import { AIGeneratedCronField } from "../resources.orgs.$organizationSlug.projects.$projectParam.schedules.new.natural-language";
4646
import { TimezoneList } from "~/components/scheduled/timezones";
47+
import { logger } from "~/services/logger.server";
4748

4849
const cronFormat = `* * * * *
4950
┬ ┬ ┬ ┬ ┬
@@ -94,9 +95,9 @@ export const action = async ({ request, params }: ActionFunctionArgs) => {
9495
submission.value?.friendlyId === result.id ? "Schedule updated" : "Schedule created"
9596
);
9697
} catch (error: any) {
97-
const errorMessage = `Failed: ${
98-
error instanceof Error ? error.message : JSON.stringify(error)
99-
}`;
98+
logger.error("Failed to create schedule", error);
99+
100+
const errorMessage = `Something went wrong. Please try again.`;
100101
return redirectWithErrorMessage(
101102
v3SchedulesPath({ slug: organizationSlug }, { slug: projectParam }),
102103
request,

0 commit comments

Comments
 (0)