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

stacklok / codegate-ui / 12863331275

20 Jan 2025 07:49AM UTC coverage: 66.312% (+0.5%) from 65.795%
12863331275

Pull #119

github

web-flow
Merge fd5d5c813 into faa17e877
Pull Request #119: fix: version endpoint

228 of 420 branches covered (54.29%)

Branch coverage included in aggregate %.

10 of 11 new or added lines in 2 files covered. (90.91%)

1 existing line in 1 file now uncovered.

457 of 613 relevant lines covered (74.55%)

59.2 hits per line

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

0.0
/src/components/Help.tsx
1
import { useEffect, useState } from "react";
2
import { useParams } from "react-router-dom";
3
import { Markdown } from "./Markdown";
4
import Prism from "prismjs";
5
import "prismjs/themes/prism-tomorrow.css";
6
import "prismjs/components/prism-bash";
7
import "prismjs/components/prism-javascript";
8
import "prismjs/components/prism-python";
9
import "prismjs/components/prism-json";
10
import "prismjs/components/prism-yaml";
11

12
export function Help() {
13
  const { section } = useParams();
×
14
  const [content, setContent] = useState<string>("");
×
15

16
  useEffect(() => {
×
17
    const fetchContent = async () => {
×
18
      try {
×
19
        const response = await fetch(`/help/${section}.md`);
×
20
        if (!response.ok) {
×
21
          throw new Error("Failed to load content");
×
22
        }
23
        const text = await response.text();
×
24
        setContent(text);
×
25

26
        // Allow content to render before highlighting
27
        setTimeout(() => {
×
28
          Prism.highlightAll();
×
29
        }, 0);
30
      } catch (error) {
31
        console.error("Error loading help content:", error);
×
32
        setContent(
×
33
          "# Error\nFailed to load help content. Please try again later.",
34
        );
35
      }
36
    };
37

38
    fetchContent();
×
39
  }, [section]);
40

41
  return (
42
    <div className="max-w-5xl bg-base rounded-lg px-6 mx-auto">
43
      <Markdown>{content}</Markdown>
44
    </div>
45
  );
46
}
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