- {
- roomIdToStateKeys.size > 0
- ? [...roomIdToStateKeys].map(([roomId, stateKeys]) => {
- const room = mx.getRoom(roomId);
+ {roomIdToStateKeys.size > 0 ? (
+ [...roomIdToStateKeys].map(([roomId, stateKeys]) => {
+ const room = mx.getRoom(roomId);
+ return stateKeys.map((stateKey) => {
+ const data = room.currentState.getStateEvents('im.ponies.room_emotes', stateKey);
+ const pack = ImagePackBuilder.parsePack(data?.getId(), data?.getContent());
+ if (!pack) return null;
return (
- stateKeys.map((stateKey) => {
- const data = room.currentState.getStateEvents('im.ponies.room_emotes', stateKey);
- const pack = ImagePackBuilder.parsePack(data?.getId(), data?.getContent());
- if (!pack) return null;
- return (
-
-
handleChange(roomId, stateKey)} isActive />
-
- {pack.displayName ?? 'Unknown'}
- {room.name}
-
-
- );
- })
+
+
handleChange(roomId, stateKey)}
+ isActive
+ />
+
+ {pack.displayName ?? 'Unknown'}
+ {room.name}
+
+
);
- })
- :
No global packs
- }
+ });
+ })
+ ) : (
+
+ No global packs
+
+ )}