refactor: Remove unused state and handler for improved code clarity
This commit is contained in:
parent
481158dd85
commit
4517133582
1 changed files with 11 additions and 10 deletions
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue