import Title from "@/components/Title"

import Friend from "./Friend"
import Stats from "./Stats"

import styles from "./overview.module.css"

import type { OverviewProps } from "@/types/components/myPages/myPage/overview"

export default function Overview({ user, title }: OverviewProps) {
  return (
    <section className={styles.container}>
      <header>
        {title && (
          <Title as="h3" level="h2" uppercase className={styles.title}>
            {title}
          </Title>
        )}
      </header>
      <section className={styles.overview}>
        <Friend user={user} />
        <Stats user={user} />
      </section>
    </section>
  )
}
