index.tsx 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. import { memo } from 'react';
  2. import { Icon } from '@iconify/react';
  3. import { useTranslation } from 'react-i18next';
  4. import { useNavigate } from 'react-router-dom';
  5. import logoIcon from '@/assets/iconify/multi-color/logo.svg';
  6. import { useResponsive } from '@/hooks/useSize';
  7. const Footerbar = memo(() => {
  8. const { t } = useTranslation();
  9. const { isMobile } = useResponsive();
  10. const navigate = useNavigate();
  11. const handleLinkClick = (path: string) => {
  12. navigate(path);
  13. };
  14. return (
  15. <footer className={`bg-black border-t border-white/10 ${isMobile ? 'min-h-[168px]' : 'min-h-[189px]'}`}>
  16. <div className={`px-[30px] sm:px-6 lg:px-8 max-w-[1276px] mx-auto ${isMobile ? 'pt-12 pb-12' : 'pt-[49px] pb-[48px]'}`}>
  17. {isMobile ? (
  18. /* Mobile Layout */
  19. <div className="flex flex-col items-start gap-5">
  20. {/* Logo */}
  21. <div className="flex items-center gap-2">
  22. <Icon icon={logoIcon} className="w-8 h-8" />
  23. <h2 className="text-base font-normal text-white leading-6">
  24. {t('components.footerbar.logo')}
  25. </h2>
  26. </div>
  27. {/* Copyright */}
  28. <p className="text-sm font-normal leading-[1.43em] text-white/40 text-center">
  29. {t('components.footerbar.copyright')}
  30. </p>
  31. </div>
  32. ) : (
  33. /* Desktop Layout */
  34. <div className="flex flex-col gap-8 h-[92px]">
  35. {/* Top Section */}
  36. <div className="flex items-center justify-between">
  37. {/* Logo */}
  38. <div className="flex items-center gap-2">
  39. <Icon icon={logoIcon} className="w-8 h-8" />
  40. <h2 className="text-base font-normal text-white leading-6">
  41. {t('components.footerbar.logo')}
  42. </h2>
  43. </div>
  44. {/* Navigation Links */}
  45. <nav className="flex items-center gap-8">
  46. <button
  47. onClick={() => handleLinkClick('/privacy')}
  48. className="text-sm font-normal leading-[1.43em] text-white/60 hover:text-white transition-colors border-none bg-transparent whitespace-nowrap"
  49. >
  50. {t('components.footerbar.privacyPolicy')}
  51. </button>
  52. <button
  53. onClick={() => handleLinkClick('/terms-of-service')}
  54. className="text-sm font-normal leading-[1.43em] text-white/60 hover:text-white transition-colors border-none bg-transparent whitespace-nowrap"
  55. >
  56. {t('components.footerbar.termsOfService')}
  57. </button>
  58. <button
  59. onClick={() => handleLinkClick('/contact')}
  60. className="text-sm font-normal leading-[1.43em] text-white/60 hover:text-white transition-colors border-none bg-transparent whitespace-nowrap"
  61. >
  62. {t('components.footerbar.contact')}
  63. </button>
  64. </nav>
  65. {/* Social Media Icons */}
  66. <div className="flex items-center gap-4">
  67. <a
  68. href="https://twitter.com"
  69. target="_blank"
  70. rel="noopener noreferrer"
  71. className="w-10 h-10 flex items-center justify-center bg-white/5 rounded-full hover:bg-white/10 transition-colors"
  72. aria-label="Twitter"
  73. >
  74. <Icon icon="ri:twitter-x-fill" className="w-5 h-5 text-white" />
  75. </a>
  76. <a
  77. href="https://facebook.com"
  78. target="_blank"
  79. rel="noopener noreferrer"
  80. className="w-10 h-10 flex items-center justify-center bg-white/5 rounded-full hover:bg-white/10 transition-colors"
  81. aria-label="Facebook"
  82. >
  83. <Icon icon="ri:facebook-fill" className="w-5 h-5 text-white" />
  84. </a>
  85. </div>
  86. </div>
  87. {/* Copyright */}
  88. <div className="flex justify-center">
  89. <p className="text-sm font-normal leading-[1.43em] text-white/40 text-center">
  90. {t('components.footerbar.copyright')}
  91. </p>
  92. </div>
  93. </div>
  94. )}
  95. </div>
  96. </footer>
  97. );
  98. });
  99. Footerbar.displayName = 'Footerbar';
  100. export default Footerbar;