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