···1import { Text, View } from "react-native";
2-import emojiData from "../../assets/emoji-data.json";
3import * as zero from "../../ui";
4import { Chat } from "../chat/chat";
5import { ChatBox } from "../chat/chat-box";
···11 isConnected: boolean;
12 messagesPerMinute?: number;
13 shownMessages?: number;
014}
1516export default function ChatPanel({
···18 isConnected,
19 messagesPerMinute = 0,
20 shownMessages = 50,
021}: ChatPanelProps) {
22 return (
23 <View
···1import { Text, View } from "react-native";
02import * as zero from "../../ui";
3import { Chat } from "../chat/chat";
4import { ChatBox } from "../chat/chat-box";
···10 isConnected: boolean;
11 messagesPerMinute?: number;
12 shownMessages?: number;
13+ emojiData?: any;
14}
1516export default function ChatPanel({
···18 isConnected,
19 messagesPerMinute = 0,
20 shownMessages = 50,
21+ emojiData = null,
22}: ChatPanelProps) {
23 return (
24 <View
+8-1
js/components/src/crypto-polyfill.native.tsx
···13 throw new Error(
14 "Livestreaming requires one of react-native-quick-crypto or expo-crypto",
15 );
16-} else if (!rnqc && expoCrypto) {
000000017 // @atproto/crypto dependencies expect crypto.getRandomValues to be a function
18 if (typeof globalThis.crypto === "undefined") {
19 globalThis.crypto = {} as any;
···13 throw new Error(
14 "Livestreaming requires one of react-native-quick-crypto or expo-crypto",
15 );
16+}
17+if (rnqc) {
18+ console.log("Using react-native-quick-crypto for crypto polyfill");
19+ // we import this in the main app, but in case this file is used standalone:
20+ globalThis.crypto = rnqc as any as Crypto;
21+}
22+if (expoCrypto) {
23+ console.log("Using expo-crypto for crypto polyfill");
24 // @atproto/crypto dependencies expect crypto.getRandomValues to be a function
25 if (typeof globalThis.crypto === "undefined") {
26 globalThis.crypto = {} as any;
+3
js/components/src/livestream-store/stream-key.tsx
···0001import { bytesToMultibase, Secp256k1Keypair } from "@atproto/crypto";
2import { useEffect, useState } from "react";
3import { Platform } from "react-native";
···1+// Just to be 100% sure it's imported successfully
2+import "../crypto-polyfill";
3+4import { bytesToMultibase, Secp256k1Keypair } from "@atproto/crypto";
5import { useEffect, useState } from "react";
6import { Platform } from "react-native";