Valtio and new tab menu

This commit is contained in:
aeroreyna
2022-03-24 22:00:00 -07:00
parent 0bee9204f2
commit 296c153b47
13 changed files with 93 additions and 66 deletions

View File

@@ -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]) {