This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useState, useEffect } from 'react'; | |
const useDeviceDetection = () => { | |
const [device, setDevice] = useState(''); | |
useEffect(() => { | |
const handleDeviceDetection = () => { | |
const userAgent = navigator.userAgent.toLowerCase(); | |
const isMobile = | |
/iphone|ipad|ipod|android|blackberry|windows phone/g.test(userAgent); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useState, useEffect } from 'react'; | |
const useWindowWidth = () => { | |
const [windowWidth, setWindowWidth] = useState(window.innerWidth); | |
useEffect(() => { | |
const handleResize = () => { | |
setWindowWidth(window.innerWidth); | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"terminal.integrated.defaultProfile.windows": "Command Prompt", | |
"php.validate.executablePath": "C:/Users/bbg20/.config/herd/bin/php83/php.exe", | |
"json.schemas": [ | |
{ | |
"fileMatch": ["/package.json"], | |
"url": "https://json.schemastore.org/package" | |
} | |
], | |
"workbench.editor.enablePreview": false, |
OlderNewer