mirror of
https://github.com/tinyhumansai/openhuman.git
synced 2026-07-28 13:32:23 +00:00
- Added .gitignore to exclude unnecessary files and directories. - Created ESLint configuration for code quality and consistency. - Set up Next.js configuration file for project settings. - Initialized package.json with dependencies and scripts for development. - Configured PostCSS for Tailwind CSS integration. - Added global styles and layout components for the landing page. - Implemented core components including AnimatedBackground, AnimatedLogo, and Feedback features. - Established feedback management system with modals and kanban board for user interactions. - Included README for project setup and usage instructions.
22 lines
597 B
TypeScript
22 lines
597 B
TypeScript
"use client";
|
|
|
|
import { useState, useEffect } from "react";
|
|
|
|
export function useMousePosition() {
|
|
const [mousePosition, setMousePosition] = useState({ x: 0.5, y: 0.5 });
|
|
|
|
useEffect(() => {
|
|
const handleMouseMove = (e: MouseEvent) => {
|
|
// Normalize mouse position to 0-1 range
|
|
const x = e.clientX / window.innerWidth;
|
|
const y = e.clientY / window.innerHeight;
|
|
setMousePosition({ x, y });
|
|
};
|
|
|
|
window.addEventListener("mousemove", handleMouseMove);
|
|
return () => window.removeEventListener("mousemove", handleMouseMove);
|
|
}, []);
|
|
|
|
return mousePosition;
|
|
}
|