constMessage=UiSchema.TaggedEnum({ClosedShare:{},CreatedLink:{showName:Schema.Boolean},DeletedLink:{},})// make or refresh the snapshot on your server, then pass the link back as `link`exportconstShareChat=(h:Html.H<typeofMessage.Type>,chat:{readonly title: string;readonly messages: number;readonly link:SharedLink|null},open: boolean,now: string)=>ShareConversation(h,{props:{ open,title: chat.title,messages: chat.messages,link: chat.link, now },onEmit:{RequestedClose:()=>Message.ClosedShare(),RequestedLink:({ showName })=>Message.CreatedLink({ showName }),RequestedUpdate:({ showName })=>Message.CreatedLink({ showName }),RequestedDelete:()=>Message.DeletedLink(),},})
API reference
Props
ShareConversation props
Name
Type
Description
openrequired
boolean
—
titlerequired
string
The chat's title, for the preview
messagesrequired
number
How many messages the chat has now
linkrequired
SharedLink | null
The live link, or null before there is one
nowrequired
string
The present, ISO, for "created 2 hours ago"
busy
boolean
A request is on its way: the buttons wait
Events
ShareConversation events
Event
Payload
Description
RequestedClose
{}
—
RequestedLink
{ showName: boolean }
Make a link to the chat as it is now
RequestedUpdate
{ showName: boolean }
Take the snapshot again, with the messages sent since