Skip to content

Commit bcb02a3

Browse files
committed
feat: added an example for playground
1 parent 3143d2d commit bcb02a3

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

apps/playground/src/modules/useIntercom/useIntercom.tsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ const RawUseIntercomPage = () => {
3838
trackEvent,
3939
showArticle,
4040
startSurvey,
41+
showSpace,
4142
} = useIntercom();
4243
const handleBoot = React.useCallback(() => boot(), [boot]);
4344

@@ -142,6 +143,10 @@ const RawUseIntercomPage = () => {
142143
showArticle(4013997);
143144
}, [showArticle]);
144145

146+
const handleShowSpace = React.useCallback(() => {
147+
showSpace('messages');
148+
}, [showSpace]);
149+
145150
const handleStartSurvey = () => startSurvey(29938254);
146151

147152
return (
@@ -278,6 +283,12 @@ const RawUseIntercomPage = () => {
278283
onClick={handleStartSurvey}
279284
/>
280285
</Item>
286+
<Item>
287+
<p>
288+
opens a messenger with the given <code>space</code>
289+
</p>
290+
<Button label="Open space" onClick={handleShowSpace} />
291+
</Item>
281292
</Grid>
282293
);
283294
};

0 commit comments

Comments
 (0)