commit 0a35a324d19a555bcfd3f847e0c236dc0a04ffcf
parent 65d3e6bc9775094ca5909b5da529d34ffcf55963
Author: Henry Unite <unitehenry@gmail.com>
Date: Mon, 11 May 2026 00:55:51 +0000
chore: lint
Diffstat:
5 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/app/src/App.tsx b/app/src/App.tsx
@@ -138,7 +138,7 @@ export function App() {
throw new Error(`Fetch failed: ${jsonResponse.status}`)
const data = await jsonResponse.json()
- let description: string, rawItems: any[]
+ let description: string, rawItems: unknown[]
const title = displayName
if (data.rss?.channel) {
diff --git a/app/src/components/ui/badge.tsx b/app/src/components/ui/badge.tsx
@@ -46,4 +46,4 @@ function Badge({
)
}
-export { Badge, badgeVariants }
+export { Badge }
diff --git a/app/src/components/ui/button.tsx b/app/src/components/ui/button.tsx
@@ -64,4 +64,4 @@ function Button({
)
}
-export { Button, buttonVariants }
+export { Button }
diff --git a/app/src/components/ui/sidebar.tsx b/app/src/components/ui/sidebar.tsx
@@ -697,6 +697,5 @@ export {
SidebarProvider,
SidebarRail,
SidebarSeparator,
- SidebarTrigger,
- useSidebar,
+ SidebarTrigger,
}
diff --git a/app/src/hooks/use-mobile.ts b/app/src/hooks/use-mobile.ts
@@ -3,17 +3,19 @@ import * as React from "react"
const MOBILE_BREAKPOINT = 768
export function useIsMobile() {
- const [isMobile, setIsMobile] = React.useState<boolean | undefined>(undefined)
+ const [isMobile, setIsMobile] = React.useState<boolean>(() => {
+ const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`)
+ return mql.matches
+ })
React.useEffect(() => {
const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`)
const onChange = () => {
- setIsMobile(window.innerWidth < MOBILE_BREAKPOINT)
+ setIsMobile(mql.matches)
}
mql.addEventListener("change", onChange)
- setIsMobile(window.innerWidth < MOBILE_BREAKPOINT)
return () => mql.removeEventListener("change", onChange)
}, [])
- return !!isMobile
+ return isMobile
}