mirror of
https://github.com/sourcebot-dev/sourcebot.git
synced 2025-12-12 12:25:22 +00:00
fix web build warnings (#348)
This commit is contained in:
parent
224460d96c
commit
4fbf8059d0
2 changed files with 3 additions and 3 deletions
|
|
@ -54,7 +54,7 @@ export const LightweightCodeHighlighter = memo<LightweightCodeHighlighter>((prop
|
|||
|
||||
const isFileTooLargeToDisplay = useMemo(() => {
|
||||
return unhighlightedLines.some(line => line.length > MAX_NUMBER_OF_CHARACTER_PER_LINE);
|
||||
}, [code]);
|
||||
}, [unhighlightedLines]);
|
||||
|
||||
const [highlightedLines, setHighlightedLines] = useState<React.ReactNode[] | null>(null);
|
||||
|
||||
|
|
@ -106,7 +106,8 @@ export const LightweightCodeHighlighter = memo<LightweightCodeHighlighter>((prop
|
|||
highlightRanges,
|
||||
highlightStyle,
|
||||
unhighlightedLines,
|
||||
lineNumbersOffset
|
||||
lineNumbersOffset,
|
||||
isFileTooLargeToDisplay,
|
||||
]);
|
||||
|
||||
const lineCount = (highlightedLines ?? unhighlightedLines).length + lineNumbersOffset;
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ import { getCodeHostInfoForRepo } from "@/lib/utils";
|
|||
import { LaptopIcon } from "@radix-ui/react-icons";
|
||||
import clsx from "clsx";
|
||||
import Image from "next/image";
|
||||
import Link from "next/link";
|
||||
import { useBrowseNavigation } from "../browse/hooks/useBrowseNavigation";
|
||||
import { Copy, CheckCircle2, ChevronRight, MoreHorizontal } from "lucide-react";
|
||||
import { useCallback, useState, useMemo, useRef, useEffect } from "react";
|
||||
|
|
|
|||
Loading…
Reference in a new issue