Skip to content
Open
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
6 changes: 4 additions & 2 deletions components/modules/SamplingErrorModule.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import React, { useState } from 'react';
import { Microscope, Info, AlertCircle, CheckCircle2 } from 'lucide-react';

const GRID_CELLS = Array.from({ length: 16 });

const SamplingErrorModule: React.FC = () => {
const [isShaken, setIsShaken] = useState(false);
const [samplingPosition, setSamplingPosition] = useState<'top' | 'bottom' | null>(null);
Expand Down Expand Up @@ -132,13 +134,13 @@ const SamplingErrorModule: React.FC = () => {
{/* The circular view */}
<div className="relative w-64 h-64 rounded-full border-4 border-slate-700 bg-white overflow-hidden shadow-2xl">
<div className="absolute inset-0 grid grid-cols-4 grid-rows-4 divide-x divide-y divide-slate-200 opacity-30 pointer-events-none">
{Array.from({length: 16}).map((_, i) => <div key={i}></div>)}
{GRID_CELLS.map((_, i) => <div key={i}></div>)}
</div>

{/* Cells Simulation */}
{result ? (
<div className="absolute inset-0">
{Array.from({ length: Math.floor(result.count / 10) }).map((_, i) => (
{new Array(Math.floor(result.count / 10)).fill(0).map((_, i) => (
<div
key={i}
className="absolute w-3 h-3 rounded-full bg-slate-400/80 border border-slate-500"
Expand Down