Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:

strategy:
matrix:
node-version: [18.x, 20.x]
node-version: [20.x, 22.x]

steps:
- name: Checkout code
Expand Down
3 changes: 2 additions & 1 deletion jest.setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ const originalConsoleError = console.error;
console.error = (...args) => {
if (
typeof args[0] === 'string' &&
args[0].includes('ReactDOMTestUtils.act is deprecated')
args[0].includes('ReactDOMTestUtils.act') &&
args[0].includes('deprecated')
) {
return;
}
Expand Down
13 changes: 4 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 1 addition & 5 deletions src/components/Dashboard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import PropTypes from "prop-types";
import { formatUptime, formatTimestamp } from "../utils";

// Dashboard viser sanntidsstatistikk og nøkkeltall for ledelse/bruker
const Dashboard = memo(function Dashboard({ anomalies, uptime, users, lastReport }) {
const Dashboard = memo(function Dashboard({ anomalies, uptime, users, lastReport = null }) {
return (
<section className="dashboard bg-gray-900 text-teal-300 p-6 rounded-lg shadow-lg mb-4">
<h2 className="text-2xl mb-4 font-bold tracking-wide">Dashboard</h2>
Expand Down Expand Up @@ -38,8 +38,4 @@ Dashboard.propTypes = {
lastReport: PropTypes.string,
};

Dashboard.defaultProps = {
lastReport: null,
};

export default Dashboard;
3 changes: 3 additions & 0 deletions src/components/FaceRecognition.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ const FaceRecognition = memo(function FaceRecognition({ onDetect, tolerance, kno

// Request camera with validated constraints
const constraints = validateCameraConstraints();
if (!navigator.mediaDevices || !navigator.mediaDevices.getUserMedia) {
throw new Error('Camera API not available in this environment');
}
const stream = await navigator.mediaDevices.getUserMedia(constraints);
streamRef.current = stream;

Expand Down
Loading