refactor: Remove unused state and handler for improved code clarity

This commit is contained in:
암냥 2025-12-24 13:30:51 +09:00
commit 4517133582
No known key found for this signature in database

View file

@ -16,15 +16,15 @@ import TXT from "@/components/txt";
export default function Page() {
const { theme } = useTheme();
const [show, setShow] = useState(true);
const [targetPosition, setTargetPosition] = useState<{ x: number; y: number } | null>(null);
const [windowVisible, setWindowVisible] = useState(true);
// const [targetPosition, setTargetPosition] = useState<{ x: number; y: number } | null>(null);
// const [windowVisible, setWindowVisible] = useState(true);
const handleTXTHover = (position: { x: number; y: number } | null) => {
setTargetPosition(position);
if (position) {
setWindowVisible(true);
}
};
// const handleTXTHover = (position: { x: number; y: number } | null) => {
// setTargetPosition(position);
// if (position) {
// setWindowVisible(true);
// }
// };
return (
<main className="min-h-screen w-screen overflow-y-scroll snap-y snap-mandatory relative">
@ -65,8 +65,9 @@ export default function Page() {
/>
</div>
<DraggableWindose targetPosition={targetPosition} isVisible={windowVisible} onClose={() => setWindowVisible(false)} onDragStart={() => setTargetPosition(null)} />
<TXT onHover={handleTXTHover} />
{/* <DraggableWindose targetPosition={targetPosition} isVisible={windowVisible} onClose={() => setWindowVisible(false)} onDragStart={() => setTargetPosition(null)} /> */}
<DraggableWindow />
<TXT />
<div className="max-w-3xl w-full">
<p> <strong></strong> <strong></strong> <strong>, </strong> .</p>
<p><strong> </strong> , .</p>