Skip to content

Commit e39a351

Browse files
committed
Add button to remove Slack channel from error alert
1 parent 8e368cc commit e39a351

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

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

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ export function ConfigureErrorAlerts({
196196
name={slackChannel.name}
197197
placeholder={<span className="text-text-dimmed">Select a Slack channel</span>}
198198
heading="Filter channels…"
199-
defaultValue={selectedSlackChannelValue}
199+
value={selectedSlackChannelValue ?? ""}
200200
dropdownIcon
201201
variant="tertiary/medium"
202202
items={slack.channels}
@@ -243,6 +243,15 @@ export function ConfigureErrorAlerts({
243243
</Callout>
244244
)}
245245
<Hint>
246+
{selectedSlackChannelValue ? (
247+
<button
248+
type="button"
249+
onClick={() => setSelectedSlackChannelValue("")}
250+
className="mr-3 text-indigo-500 transition hover:text-indigo-400 focus-visible:focus-custom"
251+
>
252+
Remove channel
253+
</button>
254+
) : null}
246255
<TextLink to={organizationSlackIntegrationPath(organization)}>
247256
Manage Slack connection
248257
</TextLink>

0 commit comments

Comments
 (0)