hunk.code_window: name: Check PR title
   on:
     pull_request:
       types:
  
hunk.labels: replace keep keep keep
hunk.after_edit: name: Check PR title conventional commit
  
hunk.file_path: .github/workflows/conventional-pr-title.yml
hunk.type: replace
file: import { useEffect, useState } from "react";
  
  export const useDevice = (): { isMobile: boolean } => {
    const [isMobile, setIsMobile] = useState(false);
  
    useEffect(() => {
      const handleResize = () => {
        const screenWidth = window.innerWidth;
        setIsMobile(screenWidth < 576);
      };
  
      // Initial check
      handleResize();
  
      // Event listener for screen resize
      window.addEventListener("resize", handleResize);
  
      // Clean up event listener on component unmount
      return () => {
        window.removeEventListener("resize", handleResize);
      };
    }, []);
  
    return { isMobile };
  };
  