• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

stacklok / codegate-ui / 12954373020

24 Jan 2025 05:19PM UTC coverage: 68.382% (-3.1%) from 71.466%
12954373020

Pull #203

github

web-flow
Merge bfdac3c3e into 9129a5b98
Pull Request #203: doc: removed help md files linking directly to documentation

345 of 604 branches covered (57.12%)

Branch coverage included in aggregate %.

28 of 86 new or added lines in 4 files covered. (32.56%)

3 existing lines in 1 file now uncovered.

758 of 1009 relevant lines covered (75.12%)

60.31 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/hooks/useHelpContent.ts
1
import { useQuery } from "@tanstack/react-query";
2
import Prism from "prismjs";
3

UNCOV
4
const fetchHelpContent = async (
×
5
  section: string | undefined,
6
): Promise<string> => {
7
  if (!section) {
×
8
    throw new Error("Section is required");
×
9
  }
10

11
  const response = await fetch(`/help/${section}.md`);
×
12
  if (!response.ok) {
×
13
    throw new Error("Failed to load content");
×
14
  }
15

16
  return response.text();
×
17
};
18

UNCOV
19
export const useHelpContent = (section: string | undefined) => {
×
UNCOV
20
  return useQuery({
×
21
    queryKey: ["helpContent", section],
22
    queryFn: () => fetchHelpContent(section),
×
23
    enabled: !!section,
24
    staleTime: 0,
25
    select: (data) => {
26
      // Allow content to render before highlighting
27
      setTimeout(() => {
×
28
        Prism.highlightAll();
×
29
      }, 0);
30
      return data;
×
31
    },
32
  });
33
};
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc