Skip to content

Commit 5b53e34

Browse files
sangggggclaude
andcommitted
chore: fix linting errors in frontend code
- Remove unused import in App.tsx - Organize imports in analytics-panel and session-histogram - Fix React useCallback dependency array in session-manager - Suppress dangerouslySetInnerHTML warning in chart component (CSS injection is safe) Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 68d41ae commit 5b53e34

File tree

5 files changed

+10
-17
lines changed

5 files changed

+10
-17
lines changed

ui-react/src/App.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
import { Toaster } from 'sonner'
22
import { SessionManager } from './components/session-manager'
33
import { ThemeProvider } from './components/theme-provider'
4-
import { useUpdater } from './hooks/use-updater'
54

65
function App() {
76
// Initialize updater (checks for updates on startup)
8-
// useUpdater()
7+
// useUpdater() - temporarily disabled
98

109
return (
1110
<ThemeProvider attribute="class" defaultTheme="system" enableSystem>

ui-react/src/components/analytics-panel.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ import {
1515
import { useTheme } from 'next-themes'
1616
import { useCallback, useEffect, useState } from 'react'
1717
import { PolarAngleAxis, PolarGrid, PolarRadiusAxis, Radar, RadarChart } from 'recharts'
18+
import { Badge } from '@/components/ui/badge'
19+
import { Button } from '@/components/ui/button'
20+
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'
1821
import {
1922
type ChartConfig,
2023
ChartContainer,
2124
ChartTooltip,
2225
ChartTooltipContent,
2326
} from '@/components/ui/chart'
24-
import { Badge } from '@/components/ui/badge'
25-
import { Button } from '@/components/ui/button'
26-
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'
2727
import {
2828
Dialog,
2929
DialogContent,

ui-react/src/components/session-histogram.tsx

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
11
import { useCallback, useEffect, useState } from 'react'
22
import { Area, AreaChart, CartesianGrid, XAxis } from 'recharts'
33
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card'
4-
import {
5-
ChartContainer,
6-
ChartTooltip,
7-
ChartTooltipContent,
8-
type ChartConfig,
9-
} from '@/components/ui/chart'
4+
import type { ChartConfig } from '@/components/ui/chart'
5+
import { ChartContainer, ChartTooltip, ChartTooltipContent } from '@/components/ui/chart'
106
import {
117
Select,
128
SelectContent,

ui-react/src/components/session-manager.tsx

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -200,12 +200,9 @@ export function SessionManager() {
200200
return `${Math.round((bytes / k ** i) * 100) / 100} ${sizes[i]}`
201201
}
202202

203-
const onSessionsLoaded = useCallback(
204-
(hasSessions: boolean) => {
205-
setHasAnySessions(hasSessions)
206-
},
207-
[setHasAnySessions]
208-
)
203+
const onSessionsLoaded = useCallback((hasSessions: boolean) => {
204+
setHasAnySessions(hasSessions)
205+
}, [])
209206

210207
return (
211208
<TooltipProvider>

ui-react/src/components/ui/chart.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ const ChartStyle = ({ id, config }: { id: string; config: ChartConfig }) => {
7070

7171
return (
7272
<style
73+
// biome-ignore lint/security/noDangerouslySetInnerHtml: CSS theme injection is safe
7374
dangerouslySetInnerHTML={{
7475
__html: Object.entries(THEMES)
7576
.map(

0 commit comments

Comments
 (0)