NsfwNote.tsx raw

   1  import { Button } from '@/components/ui/button'
   2  import { Eye } from 'lucide-react'
   3  import { useTranslation } from 'react-i18next'
   4  
   5  export default function NsfwNote({ show }: { show: () => void }) {
   6    const { t } = useTranslation()
   7  
   8    return (
   9      <div className="flex flex-col gap-2 items-center text-muted-foreground font-medium my-4">
  10        <div>{t('🔞 NSFW 🔞')}</div>
  11        <Button
  12          onClick={(e) => {
  13            e.stopPropagation()
  14            show()
  15          }}
  16          variant="outline"
  17        >
  18          <Eye />
  19          {t('Temporarily display this note')}
  20        </Button>
  21      </div>
  22    )
  23  }
  24