diff --git a/.gitignore b/.gitignore index ceaea36..1757902 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,9 @@ yarn-error.log* lerna-debug.log* .pnpm-debug.log* +certs/ +build/ + # Diagnostic reports (https://nodejs.org/api/report.html) report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json diff --git a/src/App.css b/src/App.css index 567bc19..1254586 100644 --- a/src/App.css +++ b/src/App.css @@ -23,7 +23,7 @@ height: 5vh; } -@media (max-width: 501px) { +@media (max-width: 601px) { .sensors { display: display !important; } diff --git a/src/components/teasense/index.tsx b/src/components/teasense/index.tsx index fa726de..deec481 100644 --- a/src/components/teasense/index.tsx +++ b/src/components/teasense/index.tsx @@ -19,6 +19,28 @@ const Sensor = () => { setInterval(() => pullTempFromBackend(), 1000); }, []); + useEffect(() => { + if (temp) { + if (temp >= 82.2) { + Notification.requestPermission().then((result) => { + if (result === 'granted') { + new Notification('TeaSense Alert', { + body: '♨️', + }); + } + }); + } else if (temp >= 80.0) { + Notification.requestPermission().then((result) => { + if (result === 'granted') { + new Notification('TeaSense Warning', { + body: '🫖', + }); + } + }); + } + } + }, [temp]); + return (
TeaSense