rm unneeded comments

This commit is contained in:
Mishig Davaadorj
2025-06-10 17:01:55 +02:00
parent d922371f37
commit 5e86d6228c
6 changed files with 1 additions and 17 deletions

View File

@@ -2,7 +2,7 @@ import type { NextConfig } from "next";
import packageJson from './package.json';
const nextConfig: NextConfig = {
/* config options here */
typescript: {
ignoreBuildErrors: true,
},

View File

@@ -134,7 +134,6 @@ export async function getEpisodeData(
)
.map(([key]) => key);
// --- Refactored: Group columns by suffix first, then by scale ---
// 1. Group all numeric keys by suffix (excluding 'timestamp')
const numericKeys = seriesNames.filter((k) => k !== "timestamp");
const suffixGroupsMap: Record<string, string[]> = {};

View File

@@ -6,7 +6,6 @@ import {
formatStringWithVars,
} from "@/utils/parquetUtils";
// Server component for data fetching
export default async function ExplorePage({
searchParams,
}: {

View File

@@ -47,10 +47,8 @@ export const DataRecharts = React.memo(
},
);
// Delimiter for nested/flattened keys
const NESTED_KEY_DELIMITER = ",";
// SingleDataGraph renders one chart for a group
const SingleDataGraph = React.memo(
({
data,
@@ -62,7 +60,6 @@ const SingleDataGraph = React.memo(
setHoveredTime: (t: number | null) => void;
}) => {
const { currentTime, setCurrentTime } = useTime();
// Utility: flatten nested objects with dot notation
function flattenRow(row: Record<string, any>, prefix = ""): Record<string, number> {
const result: Record<string, number> = {};
for (const [key, value] of Object.entries(row)) {
@@ -129,12 +126,10 @@ const SingleDataGraph = React.memo(
return chartData.length - 1;
};
// Handle mouseLeave - restore to video's current time
const handleMouseLeave = () => {
setHoveredTime(null);
};
// Handle click on chart - this SHOULD change the video time
const handleClick = (data: any) => {
if (data && data.activePayload && data.activePayload.length) {
const timeValue = data.activePayload[0].payload.timestamp;
@@ -143,9 +138,7 @@ const SingleDataGraph = React.memo(
};
// Custom legend to show current value next to each series
// --- Grouped Legend UI ---
const CustomLegend = () => {
// Find the closest data point to the hovered or current time
const closestIndex = findClosestDataIndex(
hoveredTime != null ? hoveredTime : currentTime,
);
@@ -172,12 +165,9 @@ const SingleDataGraph = React.memo(
groupColorMap[group] = `hsl(${idx * (360 / allGroups.length)}, 100%, 50%)`;
});
// Helper: check if all children are visible
const isGroupChecked = (group: string) => groups[group].every(k => visibleKeys.includes(k));
// Helper: check if some children are visible
const isGroupIndeterminate = (group: string) => groups[group].some(k => visibleKeys.includes(k)) && !isGroupChecked(group);
// Handle parent (group) checkbox
const handleGroupCheckboxChange = (group: string) => {
if (isGroupChecked(group)) {
// Uncheck all children
@@ -188,7 +178,6 @@ const SingleDataGraph = React.memo(
}
};
// Handle single (non-grouped) or child checkbox
const handleCheckboxChange = (key: string) => {
setVisibleKeys((prev) =>
prev.includes(key) ? prev.filter((k) => k !== key) : [...prev, key]

View File

@@ -10,8 +10,6 @@ import {
FaArrowUp,
} from "react-icons/fa";
// duration is now provided by useTime context
import { debounce } from "@/utils/debounce";
const PlaybackBar: React.FC = () => {

View File

@@ -25,7 +25,6 @@ const Sidebar: React.FC<SidebarProps> = ({
const [sidebarVisible, setSidebarVisible] = React.useState(true);
const toggleSidebar = () => setSidebarVisible((prev) => !prev);
// Ref for the sidebar nav
const sidebarRef = React.useRef<HTMLDivElement>(null);
React.useEffect(() => {