Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

footer.tsx 1.3KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. import React from 'react'
  2. import Link from 'next/link'
  3. import { RiDiscordFill, RiGithubFill } from '@remixicon/react'
  4. import { useTranslation } from 'react-i18next'
  5. type CustomLinkProps = {
  6. href: string
  7. children: React.ReactNode
  8. }
  9. const CustomLink = React.memo(({
  10. href,
  11. children,
  12. }: CustomLinkProps) => {
  13. return (
  14. <Link
  15. className='flex h-8 w-8 cursor-pointer items-center justify-center transition-opacity duration-200 ease-in-out hover:opacity-80'
  16. target='_blank'
  17. rel='noopener noreferrer'
  18. href={href}
  19. >
  20. {children}
  21. </Link>
  22. )
  23. })
  24. const Footer = () => {
  25. const { t } = useTranslation()
  26. return (
  27. <footer className='shrink-0 grow-0 px-12 py-6'>
  28. <h3 className='text-gradient text-xl font-semibold leading-tight'>{t('app.join')}</h3>
  29. <p className='system-sm-regular mt-1 text-text-tertiary'>{t('app.communityIntro')}</p>
  30. <div className='mt-3 flex items-center gap-2'>
  31. <CustomLink href='https://github.com/langgenius/dify'>
  32. <RiGithubFill className='h-5 w-5 text-text-tertiary' />
  33. </CustomLink>
  34. <CustomLink href='https://discord.gg/FngNHpbcY7'>
  35. <RiDiscordFill className='h-5 w-5 text-text-tertiary' />
  36. </CustomLink>
  37. </div>
  38. </footer>
  39. )
  40. }
  41. export default React.memo(Footer)