import { useSelector } from "react-redux" import './userInfo.scss'; import { StyledAvatar } from "../messageForm/StyledAvatar"; import { Avatar } from "@mui/material"; export const PrivatChatHeader = () => { const SERVER_URL = process.env.REACT_APP_SERVER_URL //add dispatch and saving name for user to store const selectedUser = useSelector(state => state.dataReducer.selectedUser) return (