This component does not yet have a README file. However, another Crowdbotics user may have created this component and shared it as a free community component.
import React, { useState } from "react";
import { StyleSheet, Text, SafeAreaView, Button, View, LogBox } from "react-native";
import EmojiSelector from "react-native-emoji-selector";
import Chat from "./chat";
import { createStackNavigator } from '@react-navigation/stack';
const Stack = createStackNavigator();
const EmojiPicker = ({ navigation }) => {
// In here we are storing our currently picked emoji.
const [chosenEmoji, setEmoji] = useState(null);
// This method will be called when our user selects an emoji
const handleEmojiSelected = emoji => {
setEmoji(emoji);
};
// This method will be called when our user wants to continue with
// currently selected emoji - this method will do nothing if user
// didn't pick an emoji.
const handleContinueButton = () => {
if (chosenEmoji !== null) {
navigation.replace("Chat", { emoji: chosenEmoji });
}
};
return (
Pick an emoji that will represent you in the chat
{chosenEmoji || ""}
);
};
const styles = StyleSheet.create({
container: {
flexDirection: "column",
alignItems: "center",
width: "100%",
height: "100%"
},
topContainer: {
flexDirection: "column",
alignItems: "center",
justifyContent: "center",
width: "100%",
height: "50%"
},
hint: {
fontSize: 16,
textAlign: "center",
marginTop: 32
},
continueButton: {
marginVertical: 64,
width: 300
},
emojiContainer: {
width: 64,
height: 64,
marginVertical: 32
},
emoji: {
width: "100%",
height: "100%",
fontSize: 60,
textAlign: "center",
textAlignVertical: "center",
fontSize: 60
},
empty: {
borderWidth: 5,
borderStyle: "dashed",
borderColor: "rgba(0, 0, 0, 0.2)"
}
});
import PubNub from "pubnub";
import { PubNubProvider } from "pubnub-react";
const pubnub = new PubNub({
subscribeKey: "demo",
publishKey: "demo",
uuid: "0"
});
LogBox.ignoreAllLogs(true);
const ChatNavigator = () => {
return (
)
}
export default {
title: "Chat",
navigator: ChatNavigator,
}
This component is not yet available as a verified component in the Crowdbotics platform. However, another Crowdbotics user may have created it and shared it as a free community component.