Skip to content

Commit f2a8ef1

Browse files
WarrenWarren
authored andcommitted
formatting w/biome
1 parent 32bac63 commit f2a8ef1

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

frontend/src/cards/generateInsights.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ export type InsightResult = {
1818

1919
async function fetchAIInsight(prompt: string): Promise<InsightResult> {
2020
const baseApiUrl = import.meta.env.VITE_BASE_API_URL
21-
const dataServerUrl = baseApiUrl ? `${baseApiUrl}${API_ENDPOINT}` : API_ENDPOINT
21+
const dataServerUrl = baseApiUrl
22+
? `${baseApiUrl}${API_ENDPOINT}`
23+
: API_ENDPOINT
2224

2325
if (!SHOW_INSIGHT_GENERATION) {
2426
return { content: '', rateLimited: false }

frontend/src/cards/ui/InsightDisplay.tsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,16 @@ const InsightDisplay: React.FC<InsightDisplayProps> = ({
4141
const [knownData] = splitIntoKnownsAndUnknowns(validData, demographicType)
4242

4343
const handleGenerateInsight = async () => {
44-
if (!SHOW_INSIGHT_GENERATION || !knownData.length || !metricIds.length) return
44+
if (!SHOW_INSIGHT_GENERATION || !knownData.length || !metricIds.length)
45+
return
4546

4647
setIsGeneratingInsight(true)
4748
try {
48-
const result = await generateInsight({ knownData, metricIds }, hashId, fips)
49+
const result = await generateInsight(
50+
{ knownData, metricIds },
51+
hashId,
52+
fips
53+
)
4954
if (result.rateLimited) {
5055
setRateLimitReached(true)
5156
} else {
@@ -87,4 +92,4 @@ const InsightDisplay: React.FC<InsightDisplayProps> = ({
8792
)
8893
}
8994

90-
export default InsightDisplay
95+
export default InsightDisplay

0 commit comments

Comments
 (0)