We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
useBattery hook is throwing null for everything, when I am using running the nextjs app with local net workwork npm run dev -- -H <ip_from_ifconfig>
npm run dev -- -H <ip_from_ifconfig>
import { useBattery } from "@uidotdev/usehooks"; import React from "react"; // import { AnimatePresence, motion } from "framer-motion"; function Battery(): React.JSX.Element { const { loading, level, charging, chargingTime, dischargingTime } = useBattery(); const percentage: number = level !== null ? Math.floor(level * 100) : 100; console.log( `Battery: ${percentage}% level: ${level} charging: ${charging} chargingTime: ${chargingTime} dischargingTime: ${dischargingTime} loading: ${loading}`, ); .....
The text was updated successfully, but these errors were encountered:
No branches or pull requests
useBattery hook is throwing null for everything, when I am using running the nextjs app with local net workwork
npm run dev -- -H <ip_from_ifconfig>
Code
Logs
The text was updated successfully, but these errors were encountered: