2024-10-05 15:04:17 +08:00
|
|
|
"use client"
|
|
|
|
import React, {useState} from 'react'
|
|
|
|
import MobileNav from './MobileNav'
|
|
|
|
import Nav from './Nav'
|
|
|
|
import { CoursesProps,SettingsProps } from '@/types'
|
|
|
|
|
|
|
|
const ResponsiveNav = ({ courses, settings }: { courses: CoursesProps[], settings: SettingsProps }) => {
|
|
|
|
const [showNav, setShowNav] = useState(false)
|
|
|
|
const toggleNavHandler = () => setShowNav(!showNav)
|
2024-10-08 15:11:16 +08:00
|
|
|
|
2024-10-05 15:04:17 +08:00
|
|
|
|
|
|
|
return (
|
|
|
|
<div>
|
|
|
|
<Nav openNav={toggleNavHandler} showNav={showNav} courses={courses} settings={settings} />
|
2024-10-08 15:11:16 +08:00
|
|
|
<MobileNav showNav={showNav} courses={courses} />
|
2024-10-05 15:04:17 +08:00
|
|
|
</div>
|
|
|
|
)
|
|
|
|
}
|
|
|
|
export default ResponsiveNav
|