useIntercom
+
+ useIntercom with tour
+
- starts a tour based on the tourId
-
submits an
+ starts a tour based on the
+ boots the Intercom instance, not needed if
+ boots the Intercom instance with given shuts down the Intercom instance
+ same functionality as event{' '}
diff --git a/example/modules/useIntercom/useIntercomTour.tsx b/example/modules/useIntercom/useIntercomTour.tsx
new file mode 100644
index 00000000..9cd2c78b
--- /dev/null
+++ b/example/modules/useIntercom/useIntercomTour.tsx
@@ -0,0 +1,87 @@
+import * as React from 'react';
+import styled from 'styled-components';
+
+import { IntercomProvider, useIntercom } from '../../../dist';
+
+import { Button } from '../common';
+
+const Grid = styled.div`
+ display: grid;
+ grid-template-columns: repeat(1, 1fr);
+ width: 100%;
+`;
+
+const Item = styled.div`
+ display: grid;
+ grid-template-rows: min-content;
+
+ &::after {
+ content: '';
+ margin: 2rem 0 1.5rem;
+ border-bottom: 2px solid var(--grey);
+ width: 100%;
+ }
+`;
+
+const RawUseIntercomStartPagePage = () => {
+ const { boot, shutdown, hardShutdown, startTour } = useIntercom();
+
+ const handleBoot = React.useCallback(() => boot({ name: 'Russo' }), [boot]);
+
+ const handleStartTour = React.useCallback(() => {
+ // TODO: update tour id
+ startTour(122198);
+ }, [startTour]);
+
+ return (
+ tourId
+ autoBoot in{' '}
+ IntercomProvider is true
+ props
+ shutdown, but makes sure the
+ Intercom cookies, window.Intercom and{' '}
+ window.intercomSettings are removed
+