feat: add initial my pages navigation

This commit is contained in:
Arvid Norlin
2024-04-05 09:34:12 +02:00
parent a35daee3a6
commit e5876e4e14
4 changed files with 81 additions and 21 deletions

View File

@@ -2,29 +2,22 @@ import { LogOut } from "react-feather"
import Link from "next/link"
import styles from "./sidebar.module.css"
import { SidebarProps } from "@/types/requests/myPages/navigation"
export default function Sidebar() {
export default function Sidebar({ menuItems }: SidebarProps) {
return (
<aside className={styles.sidebar}>
<nav className={styles.nav}>
<Link className={`${styles.link} ${styles.active}`} href="#">
My Pages
</Link>
<Link className={styles.link} href="#">
My Stays
</Link>
<Link className={styles.link} href="#">
My Points
</Link>
<Link className={styles.link} href="#">
My Benefits
</Link>
<Link className={styles.link} href="#">
About Scandic Friends
</Link>
<Link className={styles.link} href="#">
My Profile
</Link>
{/* <Link className={`${styles.link} ${styles.active}`} href="#">
My Scandic
</Link> */}
{/* Base styles.active on menuItem href and current path */}
{menuItems.map((item) => (
<Link key={item.uid} className={styles.link} href="#">
{item.linkText || item.title}
</Link>
))}
<Link className={styles.link} href="/api/auth/signout">
Log out <LogOut height={16} width={16} />
</Link>