()
| 60 | }, [integration]); |
| 61 | |
| 62 | const onLinearClick = async () => { |
| 63 | if (!channel) { |
| 64 | return; |
| 65 | } |
| 66 | await api |
| 67 | .postChannelIntegrations({ |
| 68 | accountId: channel.accountId!, |
| 69 | channelId: channel.id, |
| 70 | type: channelsIntegrationType.LINEAR, |
| 71 | data: { |
| 72 | redirect_after: window.location.href, |
| 73 | }, |
| 74 | }) |
| 75 | .then(({ id }) => { |
| 76 | window.location.href = `${getLinenUrl()}/api/bridge/linear/setup?integrationId=${id}`; |
| 77 | }) |
| 78 | .catch((e) => { |
| 79 | Toast.error('Something went wrong'); |
| 80 | }); |
| 81 | }; |
| 82 | |
| 83 | const onRemoveLinearClick = async () => { |
| 84 | if (!channel) { |
nothing calls this directly
no test coverage detected