import Link from "next/link"; import Image from "next/image"; import React, { useState, useEffect } from "react"; import DrawerIcon from "../../public/icons/drawer.svg"; import SettingsIcon from "../../public/icons/settings.svg"; import BotIcon from "../../public/icons/bot.svg"; import DropdownIcon from "../../public/icons/dropdown.svg"; import TwitterIcon from "../../public/icons/twitter.svg"; import GithubIcon from "../../public/icons/github.svg"; import LinkedinIcon from "../../public/icons/linkedin.svg"; export default function Sidebar() { const [bots, setBots] = useState([]); useEffect(() => { const fetchBots = async () => { const response = await fetch("/api/get_bots"); const data = await response.json(); setBots(data); }; fetchBots(); }, []); const toggleDropdown = () => { const dropdown = document.getElementById("dropdown-toggle"); dropdown.classList.toggle("hidden"); }; return ( <> {/* Mobile Toggle */} {/* Sidebar */}
Embedchain Logo Embedchain
    {/* Settings */}
  • Settings
  • {/* Bots */} {bots.length !== 0 && (
  • )}
{/* Social Icons */}
); }