Valtio and new tab menu
This commit is contained in:
@@ -3,11 +3,13 @@ import { Text, View, ScrollView, StyleSheet } from 'react-native';
|
||||
import { FAB, Button, Card, Title, IconButton } from 'react-native-paper';
|
||||
import API from './../API.js';
|
||||
import UserName from './UserName.js';
|
||||
import Media from './Media.js';
|
||||
import AwesomeIcon from 'react-native-vector-icons/FontAwesome';
|
||||
import { useSnapshot } from 'valtio';
|
||||
import GlobalState from '../contexts/GlobalState.js';
|
||||
|
||||
|
||||
let Comment = ({ comment, postid, viewer }) => {
|
||||
let Comment = ({ comment, postid }) => {
|
||||
const gState = useSnapshot(GlobalState);
|
||||
const viewer = gState.me;
|
||||
let [likes, changeLikes] = useState(Object.keys(comment.reactions).length);
|
||||
const newCommentReaction = () => {
|
||||
if (!comment.reactions[viewer._id]) {
|
||||
|
||||
Reference in New Issue
Block a user