Typescript Support
To give support to Web Apps built using Typescript we expose some data types that you can use.
Reactions
For reaction we expose an array of allowed emojis that can be used in the sendReaction() method
reactions array
You can access them in the following way:
import { reactions } from "@huddle01/iframe/types";// Output
[
"😂",
"😢",
"😦",
"😍",
"🤔",
"👀",
"🙌",
"👍",
"👎",
"🔥",
"🍻",
"🚀",
"🎉",
"❤️",
"💯",
];TReaction type
You can use the TReaction data type in the following way:
import { TReaction } from "@huddle01/iframe/types";
const [reaction, setReaction] = useState < TReaction > "🔥";Events
import { THuddleEvents } from "@huddle01/iframe/types";
const [currentEvent, setCurrentEvent] = useState<THuddleEvents | null>(null);