All files / src/pages/main-page/components MainPageNavBar.tsx

75% Statements 3/4
100% Branches 0/0
50% Functions 1/2
75% Lines 3/4

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36              46x   46x       46x                                            
import { Search } from "lucide-react";
import { memo, useState } from "react";
import { AhuoraLogo } from "@/ahuora-design-system/componentIcons/AhuoraLogo";
import { Input } from "@/ahuora-design-system/ui/input";
import MainPageNavTabs from "./MainPageNavTabs";
 
function MainPageNavBar() {
  const [searchFilter, setSearchFilter] = useState("");
 
  const handleSearchFilterChange = (e: React.ChangeEvent<HTMLInputElement>) => {
    setSearchFilter(e.target.value);
  };
 
  return (
    <nav className="fixed bg-card w-1/5 z-10 h-full flex flex-col ">
      <div className="flex flex-row items-center gap-4 px-5 py-5 mb-3">
        <AhuoraLogo />
        <p className="font-light text-lg">Ahuora</p>
      </div>
      <div className="w-[90%] mx-auto">
        <Input
          divClassName="left-nav-bar-search-input"
          startIcon={Search}
          type="text"
          placeholder="Search..."
          onChange={handleSearchFilterChange}
        />
      </div>
      <div className="w-[90%] mx-auto my-1 border-b-[1px] border-secondary"></div>
      <MainPageNavTabs />
    </nav>
  );
}
 
export default memo(MainPageNavBar);