11 changed files with 94 additions and 88 deletions
@ -0,0 +1,23 @@
@@ -0,0 +1,23 @@
|
||||
import { Button } from '@/components/ui/button' |
||||
import { Eye } from 'lucide-react' |
||||
import { useTranslation } from 'react-i18next' |
||||
|
||||
export default function NsfwNote({ show }: { show: () => void }) { |
||||
const { t } = useTranslation() |
||||
|
||||
return ( |
||||
<div className="flex flex-col gap-2 items-center text-muted-foreground font-medium my-4"> |
||||
<div>{t('🔞 NSFW 🔞')}</div> |
||||
<Button |
||||
onClick={(e) => { |
||||
e.stopPropagation() |
||||
show() |
||||
}} |
||||
variant="outline" |
||||
> |
||||
<Eye /> |
||||
{t('Temporarily display this note')} |
||||
</Button> |
||||
</div> |
||||
) |
||||
} |
||||
@ -1,21 +0,0 @@
@@ -1,21 +0,0 @@
|
||||
import { cn } from '@/lib/utils' |
||||
import { useState } from 'react' |
||||
|
||||
export default function NsfwOverlay({ className }: { className?: string }) { |
||||
const [isHidden, setIsHidden] = useState(true) |
||||
|
||||
return ( |
||||
isHidden && ( |
||||
<div |
||||
className={cn( |
||||
'absolute top-0 left-0 backdrop-blur-3xl w-full h-full cursor-pointer', |
||||
className |
||||
)} |
||||
onClick={(e) => { |
||||
e.stopPropagation() |
||||
setIsHidden(false) |
||||
}} |
||||
/> |
||||
) |
||||
) |
||||
} |
||||
Loading…
Reference in new issue