Skip to content

Commit

Permalink
comment deleted and changed to bool
Browse files Browse the repository at this point in the history
  • Loading branch information
keraliss committed Sep 30, 2024
1 parent 60a3cc5 commit faf820b
Showing 1 changed file with 6 additions and 14 deletions.
20 changes: 6 additions & 14 deletions src/components/common/hamburger.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,9 @@ const Hamburger = () => {
};

const SideMenu = () => {
const [open, setOpen] = useState(1);
const [open, setOpen] = useState(true);

const handleOpen = (value: number) =>
setOpen(open === value ? 0 : value);
const handleOpen = (value: boolean) => setOpen(value);

const list = [
{
Expand Down Expand Up @@ -120,10 +119,6 @@ const SideMenu = () => {
{ name: "Bitcoin Talks", link: "/talks" },
],
},
// {
// name: "Join our community",
// link: "/#join_our_community",
// },
];

return (
Expand Down Expand Up @@ -161,10 +156,12 @@ const SideMenu = () => {

{list.map((item, index) => {
return (
<Accordion key={index} open={open === index + 1}>
<Accordion key={index} open={open === open}>
<AccordionHeader
className="font-header text-2xl text-white "
onClick={() => handleOpen(index + 1)}
onClick={() =>
handleOpen(open ? false : true)
}
>
{item.name}
<MdKeyboardArrowDown className="-ml-5" />
Expand All @@ -186,11 +183,6 @@ const SideMenu = () => {
</Accordion>
);
})}
{/* <p className="font-header text-2xl text-white">
<a href="https://discord.com/invite/STeQFVEWf9">
Join Discord
</a>
</p> */}
</div>
);
};
Expand Down

0 comments on commit faf820b

Please sign in to comment.