Skip to content

Commit 79b7c86

Browse files
committed
chore: updated readme
1 parent 493550e commit 79b7c86

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ Used to retrieve all methods bundled with Intercom. These are based on the offic
140140
| trackEvent | (event: string, metaData?: object) => void | submits an `event` with optional `metaData`
141141
| showArticle | (articleId: string) => void | opens the Messenger with the specified article by `articleId`
142142
| startSurvey | (surveyId: number) => void | Trigger a survey in the Messenger by `surveyId`
143+
| showSpace | (spaceName: `'home' | 'messages' | 'help' | 'news' | 'tasks'`) => void | Opens the Messenger with the specified space
143144

144145
#### Example
145146
```javascript
@@ -169,7 +170,8 @@ const HomePage = () => {
169170
startTour,
170171
trackEvent,
171172
showArticle,
172-
startSurvey
173+
startSurvey,
174+
showSpace
173175
} = useIntercom();
174176

175177
const bootWithProps = () => boot({ name: 'Russo' });
@@ -185,6 +187,7 @@ const HomePage = () => {
185187
});
186188
const handleShowArticle = () => showArticle(123456);
187189
const handleStartSurvey = () => startSurvey(123456);
190+
const handleShowSpace = () => showSpace('tasks');
188191

189192
return (
190193
<>
@@ -209,6 +212,7 @@ const HomePage = () => {
209212
</button>
210213
<button onClick={handleShowArticle}>Open article in Messenger</button>
211214
<button onClick={handleStartSurvey}>Start survey in Messenger</button>
215+
<button onClick={handleShowSpace}>Open space in Messenger</button>
212216
</>
213217
);
214218
};

0 commit comments

Comments
 (0)