This commit is contained in:
quantulr
2023-11-01 17:27:06 +08:00
parent 7e465da9d2
commit 1a22404f19
87 changed files with 1604 additions and 196 deletions

View File

@ -1,5 +1,5 @@
"use client";
import React from "react";
import Image from "next/image";
import circle from "@/app/assets/circle.png";
import styles from "./LeftNav.module.scss";
@ -10,7 +10,7 @@ const LeftNav = ({
navigations,
title,
}: {
navigations: any[];
navigations?: any[];
title: string;
}) => {
const pathname = usePathname();
@ -24,12 +24,12 @@ const LeftNav = ({
<Image src={circle} alt={"circle icon"} height={16} width={16} />
<span className={"pl-2"}>{title}</span>
</div>
{navigations.length > 0 && (
{(navigations?.length ?? 0) > 0 && (
<div
className={`${styles.navContent} mt-3 mx-3 rounded-lg px-2.5 py-[5px]`}
>
<ul className={styles.navItems}>
{navigations.map((navigation) => (
{navigations?.map((navigation) => (
<li key={navigation.href}>
<Link
className={`text-sm px-[9px] h-[34px] flex items-center font-bold transition-all hover:text-[#fff176] hover:text-xs ${