mirror of https://github.com/Lapikud/tipilan
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
690 B
22 lines
690 B
'use client'; |
|
|
|
import { useState } from "react"; |
|
import Header from "./Header"; |
|
import Sidebar from "./Sidebar"; |
|
|
|
const SidebarParent = () => { |
|
const [isOpen, setIsOpen] = useState(false); |
|
const toggleSidebar = () => setIsOpen(!isOpen); |
|
|
|
return ( |
|
<div className="fixed w-screen"> |
|
<Header toggleSidebar={toggleSidebar} /> |
|
<Sidebar isOpen={isOpen} toggleSidebar={toggleSidebar}/> |
|
</div> |
|
); |
|
}; |
|
|
|
// This component is responsible for rendering the sidebar and header together. |
|
// It manages the state of the sidebar (open/closed) and passes the necessary props to both the Header and Sidebar components. |
|
|
|
export default SidebarParent; |