mirror of
https://github.com/logos-messaging/waku-react.git
synced 2026-08-11 17:43:26 +00:00
make ephemeral default to false
This commit is contained in:
parent
fc6ca3032b
commit
bc0b6c5c5c
@ -10,12 +10,12 @@ type ContentPair = {
|
|||||||
/**
|
/**
|
||||||
* Creates Encoder / Decoder pair for a given contentTopic.
|
* Creates Encoder / Decoder pair for a given contentTopic.
|
||||||
* @param {string} contentTopic - topic to orient to
|
* @param {string} contentTopic - topic to orient to
|
||||||
* @param {boolean} ephemeral - optional, makes messages ephemeral
|
* @param {boolean} ephemeral - makes messages ephemeral, default to false
|
||||||
* @returns {Object} Encoder / Decoder pair
|
* @returns {Object} Encoder / Decoder pair
|
||||||
*/
|
*/
|
||||||
export const useContentPair = (
|
export const useContentPair = (
|
||||||
contentTopic: string,
|
contentTopic: string,
|
||||||
ephemeral?: boolean,
|
ephemeral: boolean = false,
|
||||||
): ContentPair => {
|
): ContentPair => {
|
||||||
const [encoder, setEncoder] = React.useState<undefined | Encoder>();
|
const [encoder, setEncoder] = React.useState<undefined | Encoder>();
|
||||||
const [decoder, setDecoder] = React.useState<undefined | Decoder>();
|
const [decoder, setDecoder] = React.useState<undefined | Decoder>();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user