import React from 'react'; import { useSelector } from 'react-redux'; import { Link, useParams } from 'react-router-dom'; import { FaCog } from 'react-icons/fa'; import { IoIosNotifications } from 'react-icons/io'; import { RootState } from '../../store/store'; import { UserState } from '../../store/slices/userSlice'; const HomeTopNav = () => { const user: UserState = useSelector((state: RootState) => state.user); const initials = user.username ? user.username .split(' ') .map((n) => n[0]) .join('') .slice(0, 2) .toUpperCase() : 'U'; return (

Home

{/* Notification + Settings with smaller gap */}
{/* Avatar with separate spacing */}
{user.picture ? ( User avatar ) : ( initials )}
); }; export default HomeTopNav;