Hooks
useDeviceType
Custom hook to detect device type
Setup
Install the following dependencies:
Install the necessary dependencies using your preferred package manager:
Setup hook
Create a new file called useDeviceType.ts in your hooks directory:
hooks/useDeviceType.ts