Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update grouphug.mdx #17

Open
wants to merge 1 commit into
base: gh-pages
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions pages/docs/components/grouphug.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ npm i --save @yomo/group-hug-react
Create a [Presence](https://github.com/yomorun/presencejs) instance

```js
import Presence from "@yomo/presence";
import { createPresence } from "@yomo/presence";

// create an instance.
const presence = new Presence("https://lo.yomo.dev:8443/v1", {
const presence = createPresence("https://lo.yomo.dev:8443/v1", {
//If you want to use Allegro's Yomo service, please modify the URL to "https://prscd2.allegro.earth/v1"
publicKey: "DEV_TOKEN",
id,
debug: true,
});
```
Expand All @@ -40,6 +40,7 @@ const App = () => {
<div>
<GroupHug
presence={presence}
channel={channel}
id={peerId}
name={peerDisplayName}
darkMode={darkMode}
Expand Down Expand Up @@ -97,10 +98,10 @@ Here are the full props:

| name | type | description |
| --------------------- | -------------------- | --------------------------------------------------------------------------------------------------------- |
| presence | Promise\<IPresence> | The Presence instance |
| channel | string | The channel name of the Presence instance |
| id | string | The unique identifier of the user |
| name | string | The name or display name of the user |
| presence* | Promise\<IPresence> | The Presence instance |
| channel* | string | The channel name of the Presence instance |
| id* | string | The unique identifier of the user |
| name* | string | The name or display name of the user |
| avatar | string | The avatar image url of the user |
| placeholder | 'shape', 'character' | The placeholder image when `avatar` absence |
| MPOP | boolean | A boolean value indicating whether the MPOP (Multiple Points of Presence) feature is enabled for the user |
Expand Down