From 75f39f8f9e4076bd0994b4d8484a2773cc29a074 Mon Sep 17 00:00:00 2001 From: charlenehuang1 <155873161+charlenehuang1@users.noreply.github.com> Date: Mon, 24 Nov 2025 22:17:50 -0800 Subject: [PATCH] Revert "resolve merge issues (#141)" This reverts commit 9a5c4e5fa8715d46ef9571de7c816d181f8b8286. --- package.json | 3 +- .../assets/FacialRecognition/AccuracyChart.js | 104 ------------------ website/src/caseStudies/FacialRecognition.js | 3 +- 3 files changed, 2 insertions(+), 108 deletions(-) delete mode 100644 website/src/assets/FacialRecognition/AccuracyChart.js diff --git a/package.json b/package.json index 730121b..5115de9 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,6 @@ "url": "https://github.com/uclaacm/bias-by-us/issues" }, "devDependencies": { - "husky": "^7.0.0", - "lint-staged": "^16.2.6" + "husky": "^7.0.0" } } diff --git a/website/src/assets/FacialRecognition/AccuracyChart.js b/website/src/assets/FacialRecognition/AccuracyChart.js deleted file mode 100644 index fff7355..0000000 --- a/website/src/assets/FacialRecognition/AccuracyChart.js +++ /dev/null @@ -1,104 +0,0 @@ -import React, { useEffect, useRef } from "react"; -import { - Chart as ChartJS, - BarController, - BarElement, - CategoryScale, - LinearScale, - Tooltip, - Legend, -} from "chart.js"; - -ChartJS.register( - BarController, - BarElement, - CategoryScale, - LinearScale, - Tooltip, - Legend, -); - -export default function AccuracyChart() { - const canvasRef = useRef(null); - const chartInstanceRef = useRef(null); - - useEffect(() => { - const ctx = canvasRef.current.getContext("2d"); - - if (chartInstanceRef.current) { - chartInstanceRef.current.destroy(); - } - - const data = { - labels: ["Microsoft", "Face++", "IBM", "Amazon", "Kairos"], - datasets: [ - { - label: "Darker female", - backgroundColor: "#e58a84", - data: [79.2, 65.5, 65.3, 68.63, 77.5], - }, - { - label: "Darker male", - backgroundColor: "#b39ce4", - data: [94, 99.3, 88, 98.74, 98.7], - }, - { - label: "Lighter female", - backgroundColor: "#8cb492", - data: [98.3, 90.2, 92.9, 92.88, 93.6], - }, - { - label: "Lighter male", - backgroundColor: "#f7c795", - data: [100, 99.2, 99.7, 100, 100], - }, - ], - }; - - const chart = new ChartJS(ctx, { - type: "bar", - data, - options: { - responsive: true, - plugins: { - legend: { - position: "bottom", - }, - tooltip: { - callbacks: { - label: (context) => - `${context.dataset.label}: ${context.parsed.y}%`, - }, - }, - title: { - display: true, - text: "Accuracy of Face Recognition Technologies", - }, - }, - scales: { - y: { - beginAtZero: true, - title: { - display: true, - text: "Accuracy (%)", - }, - }, - }, - }, - }); - - chartInstanceRef.current = chart; - - return () => { - if (chartInstanceRef.current) { - chartInstanceRef.current.destroy(); - } - }; - }, []); - - return ( -