import React from "react"; import { useDispatch, useSelector } from "react-redux"; import Header from "../components/globals/Header"; import IconWrapper from "../components/globals/IconWrapper"; import { userProfileActions } from "../store/userProfileSlice"; import { modalActions } from "../store/modalSlice"; import useTime from "../hooks/useTime"; import Image from "../components/globals/Image"; function UserProfile() { const { visible, profile } = useSelector((state) => state.userProfileReducer); const dispatch = useDispatch(); const lastSeenTime = useTime(profile?.status?.lastSeen); return (
{profile.name || profile.username}
{profile.status?.online ? "Online" : `last seen at ${lastSeenTime}`}
{profile.bio}
Bio