Skip to content

Commit ba617fa

Browse files
committed
Revert "Merge pull request #25 from triggerdotdev/dev"
This reverts commit ef149bd, reversing changes made to 56e5a5c.
1 parent 35aedad commit ba617fa

3 files changed

Lines changed: 3 additions & 23 deletions

File tree

‎apps/docs/integrations/apis/slack/actions/post-message.mdx‎

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -127,12 +127,9 @@ In this examples there are two workflows:
127127
1. Messages your team every minute (!) and asks them how they're doing.
128128
2. Receives the interaction from users. It adds reactions when the buttons are pressed and posts a message when a user selects from the dropdown menu.
129129

130-
Please note, that to use `jsx-slack` you will need to add the `jsxImportSource` pragma to the top of your file. This is because `jsx-slack` is not a React library, but it uses the same syntax as React. Also, you might need to add `"jsx": "react-jsx"` to your `compilerOption` in `tsconfig.json`. The workflow file needs to be a `.jsx` or `.tsx` file (like when you use React).
131-
132130
<CodeGroup>
133131

134-
```typescript workflow.tsx
135-
/** @jsxImportSource jsx-slack */
132+
```typescript Blocks with interactivity
136133
import { slack } from "@trigger.dev/integrations";
137134
import JSXSlack, {
138135
Actions,
@@ -210,7 +207,6 @@ new Trigger({
210207
channelId: event.channel.id,
211208
});
212209
}
213-
break;
214210
}
215211
case "status-help": {
216212
//the user needs help so add an 🆘 emoji as a reaction
@@ -221,7 +217,6 @@ new Trigger({
221217
channelId: event.channel.id,
222218
});
223219
}
224-
break;
225220
}
226221
case "rating": {
227222
if (action.type != "static_select") {
@@ -249,14 +244,4 @@ new Trigger({
249244
}).listen();
250245
```
251246
252-
```json tsconfig.json
253-
{
254-
//other options
255-
"compilerOptions": {
256-
"jsx": "react-jsx"
257-
//other options
258-
}
259-
}
260-
```
261-
262247
</CodeGroup>

‎apps/webapp/app/routes/__app/orgs/$organizationSlug/__org/index.tsx‎

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -184,18 +184,15 @@ function WorkflowList({
184184
}
185185

186186
function lastRunDescription(lastRun: WorkflowListItem["lastRun"]) {
187-
if (lastRun === null || lastRun === undefined) {
187+
if (lastRun === undefined) {
188188
return "Never";
189189
}
190-
191190
if (lastRun.status === "SUCCESS") {
192191
if (lastRun.finishedAt) {
193192
return formatDateTime(lastRun.finishedAt);
194-
} else {
195-
return "Unknown";
196193
}
194+
throw new Error("lastRun.finishedAt is undefined");
197195
}
198-
199196
return runStatusLabel(lastRun.status);
200197
}
201198

‎examples/send-to-slack/src/index.tsx‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,6 @@ new Trigger({
221221
channelId: event.channel.id,
222222
});
223223
}
224-
break;
225224
}
226225
case "status-help": {
227226
//the user needs help so add an 🆘 emoji as a reaction
@@ -232,7 +231,6 @@ new Trigger({
232231
channelId: event.channel.id,
233232
});
234233
}
235-
break;
236234
}
237235
case "rating": {
238236
if (action.type != "static_select") {

0 commit comments

Comments
 (0)