Skip to content
Merged
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
11 changes: 6 additions & 5 deletions frontend/src/screens/main/AnalysisScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import { useAuthStore } from '../../store/useAuthStore';
import { useAlgorithmStore } from '../../store/useAlgorithmStore';
import { useAppNavigation } from '../../navigation/hooks';
import { ChevronRight } from 'lucide-react-native';

const MIN_LOGS_FOR_ANALYSIS = 30;

Expand All @@ -21,7 +22,7 @@
}

export function AnalysisScreen() {
const { symptoms, fetchSymptoms } = useBankStore();

Check warning on line 25 in frontend/src/screens/main/AnalysisScreen.tsx

View workflow job for this annotation

GitHub Actions / lint-and-test

'symptoms' is assigned a value but never used

Check warning on line 25 in frontend/src/screens/main/AnalysisScreen.tsx

View workflow job for this annotation

GitHub Actions / lint-and-test

'symptoms' is assigned a value but never used
const username = useAuthStore((s) => s.user.name);
const { runAlgorithm } = useAlgorithmStore();
const [symptomCounts, setSymptomCounts] = useState<SymptomCount[]>([]);
Expand Down Expand Up @@ -88,7 +89,7 @@
}

load();
}, []);

Check warning on line 92 in frontend/src/screens/main/AnalysisScreen.tsx

View workflow job for this annotation

GitHub Actions / lint-and-test

React Hook useEffect has missing dependencies: 'fetchSymptoms', 'runAlgorithm', and 'username'. Either include them or remove the dependency array

Check warning on line 92 in frontend/src/screens/main/AnalysisScreen.tsx

View workflow job for this annotation

GitHub Actions / lint-and-test

React Hook useEffect has missing dependencies: 'fetchSymptoms', 'runAlgorithm', and 'username'. Either include them or remove the dependency array

const belowThreshold = totalLogs < MIN_LOGS_FOR_ANALYSIS;

Expand Down Expand Up @@ -144,10 +145,10 @@
function SectionDivider({ label }: { label: string }) {
return (
<View className="flex-row items-center mb-3">
<Text className="text-xs font-bold text-remetra-muted mr-2 tracking-[1px]">
<Text className="text-xs text-remetra-espresso mr-2 tracking-[1px]">
{label.toUpperCase()}
</Text>
<View className="flex-1 h-px bg-neutral-200" />
<View className="flex-1 h-px bg-white" />
</View>
);
}
Expand All @@ -165,15 +166,15 @@
>
<Text className="text-sm font-bold text-remetra-mauve w-6 text-center">{rank}</Text>
<View className="flex-1">
<Text className="text-[15px] text-neutral-700 font-semibold">{item.name}</Text>
<Text className="text-[15px] text-remetra-espresso font-semibold">{item.name}</Text>
{subtitle ? (
<Text className="text-xs text-neutral-700 mt-0.5">{subtitle}</Text>
<Text className="text-xs text-remetra-warm-brown mt-0.5">{subtitle}</Text>
) : null}
</View>
<View className="bg-remetra-peach rounded-full px-2.5 py-1 min-w-9 items-center">
<Text className="text-sm font-bold text-remetra-rose">{item.count}</Text>
</View>
<Text className="text-lg text-remetra-border">›</Text>
<ChevronRight size={16} color="#5C2E14" strokeWidth={2} />
</TouchableOpacity>
);
}
Loading