Skip to content

Commit 8814fc3

Browse files
fix(ui): address lint warnings in Q&A tabs and dynamic background
1 parent 2154aaa commit 8814fc3

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

frontend/components/q&a/useQaTabs.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,9 @@ export function useQaTabs() {
110110
setItems([]);
111111
setTotalPages(0);
112112
} finally {
113-
if (!isActive) {
114-
return;
113+
if (isActive) {
114+
setIsLoading(false);
115115
}
116-
setIsLoading(false);
117116
}
118117
}
119118

frontend/components/shared/DynamicGridBackground.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ export function DynamicGridBackground({
1616
}: DynamicGridBackgroundProps) {
1717
const mouseX = useMotionValue(0);
1818
const mouseY = useMotionValue(0);
19+
const maskImage = useMotionTemplate`radial-gradient(300px circle at ${mouseX}px ${mouseY}px, black, transparent)`;
1920

2021
function handleMouseMove(event: MouseEvent<HTMLElement>) {
2122
const { left, top } = event.currentTarget.getBoundingClientRect();
@@ -35,8 +36,8 @@ export function DynamicGridBackground({
3536
<motion.div
3637
className="pointer-events-none absolute inset-0 opacity-0 transition-opacity duration-300 group-hover/dynamic:opacity-100"
3738
style={{
38-
maskImage: useMotionTemplate`radial-gradient(300px circle at ${mouseX}px ${mouseY}px, black, transparent)`,
39-
WebkitMaskImage: useMotionTemplate`radial-gradient(300px circle at ${mouseX}px ${mouseY}px, black, transparent)`,
39+
maskImage,
40+
WebkitMaskImage: maskImage,
4041
}}
4142
>
4243
<div className="absolute inset-0 bg-[linear-gradient(to_right,#1e5eff_1px,transparent_1px),linear-gradient(to_bottom,#1e5eff_1px,transparent_1px)] dark:bg-[linear-gradient(to_right,#ff2d55_1px,transparent_1px),linear-gradient(to_bottom,#ff2d55_1px,transparent_1px)] bg-[size:40px_40px] opacity-20 dark:opacity-30" />

0 commit comments

Comments
 (0)