import constants from "@/lib/constants"
import getProfiles from "@/lib/profiles";
import sidebar from "@/styles/Sidebar.module.sass"
import Link from "./Link";

const Sidebar = () => {
    let profiles = getProfiles()
    return (
        <aside id={sidebar.sidebar}>
            <div className={sidebar.me}>
                {constants.name}
            </div>
            <p className={sidebar.bio}>
                {constants.bio}
            </p>

            <nav id={sidebar.nav}>
                <ul>
                    <Link href="/" title="home" asList />
                    <Link href="/blog" title="blog" asList />
                </ul>
                <ul>
                    {profiles.map((profile, index) => {
                        return (<Link key={index} href={profile.link} title={profile.site} asList withArrow />)
                    })}
                </ul>
            </nav>
        </aside>

    );
};



export default Sidebar;