Skip to content

Commit f370ccc

Browse files
committed
Fix
1 parent 608eebd commit f370ccc

5 files changed

Lines changed: 132 additions & 2 deletions

File tree

api/package-lock.json

Lines changed: 126 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
},
2222
"devDependencies": {
2323
"@eslint/js": "^9.39.4",
24+
"@vitejs/plugin-react": "^5.1.4",
2425
"eslint": "^9.39.4",
2526
"eslint-plugin-react-hooks": "^5.2.0",
2627
"typescript": "^5.9.3",

api/src/components/Docs/ReferencesLink.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export const ReferencesLink: React.FC<{ name: string }> = ({ name }) => {
3333
return (
3434
<StyledReferencesLink
3535
to={`/vscripts${search}`}
36-
className={isActive ? "active" : undefined}
36+
className={() => isActive ? "active" : ""}
3737
title="Find all usages of this API"
3838
>
3939
{referencesCount} reference{referencesCount === 1 ? "" : "s"}

api/src/components/Lists.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ interface Props<T> {
88
}
99

1010
export function LazyList<T>({ className, data, render }: Props<T>) {
11-
const cache = useMemo(() => new CellMeasurerCache({ fixedWidth: true }), []);
11+
// eslint-disable-next-line react-hooks/exhaustive-deps -- recreate cache when data changes to remeasure row heights
12+
const cache = useMemo(() => new CellMeasurerCache({ fixedWidth: true }), [data]);
1213
const renderRow = useCallback<ListRowRenderer>(
1314
({ key, parent, style, index }) => (
1415
<CellMeasurer cache={cache} key={key} parent={parent} rowIndex={index}>

api/vite.config.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1+
import react from "@vitejs/plugin-react";
12
import { defineConfig } from "vite";
23
import svgr from "vite-plugin-svgr";
34

45
export default defineConfig({
56
base: "/api/",
67
plugins: [
8+
react(),
79
svgr({
810
svgrOptions: { dimensions: false },
911
}),

0 commit comments

Comments
 (0)