make ephemeral default to false

This commit is contained in:
Sasha 2023-02-21 22:18:51 +01:00
parent fc6ca3032b
commit bc0b6c5c5c
No known key found for this signature in database

View File

@ -10,12 +10,12 @@ type ContentPair = {
/**
* Creates Encoder / Decoder pair for a given contentTopic.
* @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
*/
export const useContentPair = (
contentTopic: string,
ephemeral?: boolean,
ephemeral: boolean = false,
): ContentPair => {
const [encoder, setEncoder] = React.useState<undefined | Encoder>();
const [decoder, setDecoder] = React.useState<undefined | Decoder>();