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.

Header.tsx 1.3KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. 'use client'
  2. import { useState } from 'react'
  3. import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
  4. import { faBars } from '@fortawesome/free-solid-svg-icons'
  5. import { Button, Image, Flex, Typography } from 'antd'
  6. import Sidebar from '@/components/layout/Sidebar'
  7. import BellNotification from '@/components/ui/BellNotification'
  8. const { Text } = Typography
  9. const Header = () => {
  10. const [showSideBar, setShowSideBar] = useState(false)
  11. return (
  12. <Flex align='center' className="!px-4 !py-2 !relative !z-40 !bg-white !shadow-sm">
  13. {/* Sidebar Trigger */}
  14. <Button
  15. type="text"
  16. icon={<FontAwesomeIcon icon={faBars} />}
  17. onClick={() => setShowSideBar(true)}
  18. className="text-lg text-gray-700"
  19. />
  20. {/* Sidebar Component */}
  21. <Sidebar open={showSideBar} setOpen={setShowSideBar} />
  22. {/* Logo + Brand */}
  23. <Flex justify='center' className="!ms-3">
  24. <Image
  25. src="/ruccan_logo.png"
  26. alt="Ruccan Logo"
  27. preview={false}
  28. height={24}
  29. />
  30. <Text className="!text-black !font-bold !ms-3">Ruccan.com</Text>
  31. </Flex>
  32. {/* Notification Bell */}
  33. <div className="ms-auto">
  34. <BellNotification />
  35. </div>
  36. </Flex>
  37. )
  38. }
  39. export default Header