// © XlXi 2021 // Graphictoria 5 import { useState, useRef, useEffect } from 'react'; import Twemoji from 'react-twemoji'; import { buildGenericApiUrl } from '../util/HTTP.js'; import Loader from './Loader'; let posts = [ { postId: 0, poster: { type: "User", name: "XlXi", icon: "fa-solid fa-gavel", thumbnail: "https://www.gtoria.local/images/testing/headshot.png" }, content: "gah 🥚in dammmmmm", time: "Now" }, { postId: 1, poster: { id: 1, type: "Group", name: "Graphictoria", thumbnail: "https://www.gtoria.local/images/logo.png" }, content: "test 2 😊", time: "Now" } ]; const Feed = () => { const inputRef = useRef(); const submitRef = useRef(); const feedRef = useRef(); const [feedLoaded, setFeedLoaded] = useState(true); const [mouseHover, setMouseHover] = useState(-1); useEffect(() => { }); return ( <>

My Feed

{ feedLoaded ? ( posts.length > 0 ?
{ posts.map(({ postId, poster, time, content }, index) => <>
setMouseHover(index) } onMouseLeave={ () => setMouseHover(-1) }>
{ poster.type == 'User' ? : }
{ poster.name }{ poster.icon ? <>  : null } { mouseHover == index ? Report : null }

{ time }

{ content }

{ posts.length != (index+1) ?
: null } ) }
:

No posts were found. You could be the first!

) :
} ); }; export default Feed;