MCPcopy Create free account
hub / github.com/Linen-dev/linen.dev / onLinearClick

Function onLinearClick

apps/web/ui/IntegrationsModal/index.tsx:62–81  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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) {

Callers

nothing calls this directly

Calls 2

getLinenUrlFunction · 0.90
errorMethod · 0.65

Tested by

no test coverage detected