"use client" import React, { useState, useEffect } from 'react' import Image from 'next/image' import Link from 'next/link' import { FiChevronDown } from "react-icons/fi"; import { FaFacebookF, FaYoutube } from "react-icons/fa"; import { RiInstagramFill } from "react-icons/ri"; import { IoMenu, IoClose } from "react-icons/io5"; import { CoursesProps, SettingsProps } from '@/types' //define props type type Props = { openNav: () => void showNav: boolean courses: CoursesProps[] settings: SettingsProps } const Nav = ({ openNav, courses, showNav, settings }: Props) => { const [dropdownOpen, setDropdownOpen] = useState(false); return (
logo

{"主頁"}

{dropdownOpen && (
{courses.map((course) => ( {course.title} ))}
)}

{"關於我們"}

{/*button*/}
window.open(settings.facebook)} >
window.open(settings.instagram)} >
window.open(settings.youtube)} >
{/*burger*/} {showNav ? ( ) : ( )}
) } export default Nav