27 lines
No EOL
919 B
TypeScript
27 lines
No EOL
919 B
TypeScript
import Image from "next/image";
|
|
import { useIsMobile } from "@/hooks/use-mobile";
|
|
|
|
interface TXTProps {
|
|
onHover?: (position: { x: number; y: number } | null) => void;
|
|
}
|
|
|
|
export default function TXT({ onHover }: TXTProps) {
|
|
const isMobile = useIsMobile();
|
|
|
|
if (isMobile) return null;
|
|
|
|
return (
|
|
<div
|
|
className="flex flex-col items-center justify-center gap-4 absolute top-4 left-4 p-2 cursor-pointer font-galmuri drag-none select-none"
|
|
onMouseEnter={() => onHover?.({ x: 16, y: 16 })}
|
|
onMouseLeave={() => onHover?.(null)}
|
|
onClick={() => {
|
|
alert("왜 편법을 쓰지?");
|
|
window.location.reload();
|
|
}}
|
|
>
|
|
<Image src="/txt.webp" alt="txt" width={24} height={24} />
|
|
<span className="text-sm font-medium text-foreground/80 font-galmuri">비밀.txt</span>
|
|
</div>
|
|
);
|
|
} |