"use client"
import { Metadata } from "next"
import { useEffect, useState } from "react"

const metadata: Metadata = {
  title: "Your Feed"
}

export default function HomeUser() {

  const [username, setUsername] = useState("")

  useEffect(() => {
    const storedUsername = localStorage.getItem("loginUsername")
    if (storedUsername) {
      setUsername(storedUsername)
    }
  }, [])

  return (
    <div className="home-user container pt-5">
      <h2 className="text-center">Hello <strong>{username}</strong>, your feed is empty.</h2>
      <p className="lead text-muted text-center">Your feed displays the latest posts from the people you follow. If you don&rsquo;t have any friends to follow that&rsquo;s okay; you can use the &ldquo;Search&rdquo; feature in the top menu bar to find content written by people with similar interests and then follow them.</p>
    </div>

  )
}