Skip to content

Commit 9ef3a59

Browse files
committed
Adds link to manage your Slack connection
1 parent 4b044f7 commit 9ef3a59

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,11 @@ import { Select, SelectItem } from "~/components/primitives/Select";
2626
import { UnorderedList } from "~/components/primitives/UnorderedList";
2727
import type { ErrorAlertChannelData } from "~/presenters/v3/ErrorAlertChannelPresenter.server";
2828
import { useOptimisticLocation } from "~/hooks/useOptimisticLocation";
29+
import { useOrganization } from "~/hooks/useOrganizations";
2930
import { cn } from "~/utils/cn";
31+
import { organizationSlackIntegrationPath } from "~/utils/pathBuilder";
3032
import { ExitIcon } from "~/assets/icons/ExitIcon";
33+
import { TextLink } from "~/components/primitives/TextLink";
3134
import { BellAlertIcon } from "@heroicons/react/24/solid";
3235

3336
export const ErrorAlertsFormSchema = z.object({
@@ -59,6 +62,7 @@ export function ConfigureErrorAlerts({
5962
connectToSlackHref,
6063
formAction,
6164
}: ConfigureErrorAlertsProps) {
65+
const organization = useOrganization();
6266
const fetcher = useFetcher<{ ok?: boolean }>();
6367
const navigate = useNavigate();
6468
const toast = useToast();
@@ -177,6 +181,7 @@ export function ConfigureErrorAlerts({
177181
{/* Slack section */}
178182
<div>
179183
<Header3 className="mb-1">Slack</Header3>
184+
180185
<InputGroup fullWidth>
181186
{slack.status === "READY" ? (
182187
<>
@@ -222,6 +227,11 @@ export function ConfigureErrorAlerts({
222227
<InlineCode variant="extra-small">/invite @Trigger.dev</InlineCode>.
223228
</Callout>
224229
)}
230+
<Hint>
231+
<TextLink to={organizationSlackIntegrationPath(organization)}>
232+
Manage Slack connection
233+
</TextLink>
234+
</Hint>
225235
<input
226236
type="hidden"
227237
name={slackIntegrationId.name}

0 commit comments

Comments
 (0)