Skip to content

Commit be70f42

Browse files
authored
Adds a link to the reduce spend docs page from the billing alerts page (#2345)
* Adds a link to the reduce spend docs page from the billing alerts page * Copy tweak
1 parent bb54e97 commit be70f42

File tree

1 file changed

+14
-5
lines changed
  • apps/webapp/app/routes/_app.orgs.$organizationSlug.settings.billing-alerts

1 file changed

+14
-5
lines changed

apps/webapp/app/routes/_app.orgs.$organizationSlug.settings.billing-alerts/route.tsx

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { conform, list, requestIntent, useFieldList, useForm } from "@conform-to
22
import { parse } from "@conform-to/zod";
33
import { Form, useActionData, type MetaFunction } from "@remix-run/react";
44
import { json, type ActionFunction, type LoaderFunctionArgs } from "@remix-run/server-runtime";
5+
import { tryCatch } from "@trigger.dev/core";
56
import { Fragment, useEffect, useRef, useState } from "react";
67
import { redirect, typedjson, useTypedLoaderData } from "remix-typedjson";
78
import { z } from "zod";
@@ -22,19 +23,20 @@ import { InputGroup } from "~/components/primitives/InputGroup";
2223
import { Label } from "~/components/primitives/Label";
2324
import { NavBar, PageAccessories, PageTitle } from "~/components/primitives/PageHeader";
2425
import { Paragraph } from "~/components/primitives/Paragraph";
26+
import { TextLink } from "~/components/primitives/TextLink";
2527
import { prisma } from "~/db.server";
2628
import { featuresForRequest } from "~/features.server";
2729
import { redirectWithErrorMessage, redirectWithSuccessMessage } from "~/models/message.server";
2830
import { getBillingAlerts, setBillingAlert } from "~/services/platform.v3.server";
2931
import { requireUserId } from "~/services/session.server";
3032
import { formatCurrency } from "~/utils/numberFormatter";
3133
import {
34+
docsPath,
3235
OrganizationParamsSchema,
3336
organizationPath,
3437
v3BillingAlertsPath,
3538
} from "~/utils/pathBuilder";
3639
import { useCurrentPlan } from "../_app.orgs.$organizationSlug/route";
37-
import { tryCatch } from "@trigger.dev/core";
3840

3941
export const meta: MetaFunction = () => {
4042
return [
@@ -199,10 +201,17 @@ export default function Page() {
199201
<PageBody scrollable={true}>
200202
<MainHorizontallyCenteredContainer>
201203
<div>
202-
<Header2 spacing>Billing alerts</Header2>
203-
<Paragraph spacing variant="small">
204-
Receive an email when your compute spend crosses different thresholds.
205-
</Paragraph>
204+
<div className="mb-3 border-b border-grid-dimmed pb-3">
205+
<Header2 spacing>Billing alerts</Header2>
206+
<Paragraph variant="small">
207+
Receive an email when your compute spend crosses different thresholds. You can also
208+
learn how to{" "}
209+
<TextLink to={docsPath("how-to-reduce-your-spend")}>
210+
reduce your compute spend
211+
</TextLink>
212+
.
213+
</Paragraph>
214+
</div>
206215
<Form method="post" {...form.props}>
207216
<Fieldset>
208217
<InputGroup fullWidth>

0 commit comments

Comments
 (0)