Преглед изворни кода

Merge pull request #6581 from kahirokunn/fix-typo

fix typo
RiverRay пре 4 месеци
родитељ
комит
1f090dd1c4
2 измењених фајлова са 5 додато и 5 уклоњено
  1. 3 3
      app/components/artifacts.tsx
  2. 2 2
      app/components/markdown.tsx

+ 3 - 3
app/components/artifacts.tsx

@@ -29,11 +29,11 @@ type HTMLPreviewProps = {
   onLoad?: (title?: string) => void;
 };
 
-export type HTMLPreviewHander = {
+export type HTMLPreviewHandler = {
   reload: () => void;
 };
 
-export const HTMLPreview = forwardRef<HTMLPreviewHander, HTMLPreviewProps>(
+export const HTMLPreview = forwardRef<HTMLPreviewHandler, HTMLPreviewProps>(
   function HTMLPreview(props, ref) {
     const iframeRef = useRef<HTMLIFrameElement>(null);
     const [frameId, setFrameId] = useState<string>(nanoid());
@@ -207,7 +207,7 @@ export function Artifacts() {
   const [code, setCode] = useState("");
   const [loading, setLoading] = useState(true);
   const [fileName, setFileName] = useState("");
-  const previewRef = useRef<HTMLPreviewHander>(null);
+  const previewRef = useRef<HTMLPreviewHandler>(null);
 
   useEffect(() => {
     if (id) {

+ 2 - 2
app/components/markdown.tsx

@@ -17,7 +17,7 @@ import { showImageModal, FullScreen } from "./ui-lib";
 import {
   ArtifactsShareButton,
   HTMLPreview,
-  HTMLPreviewHander,
+  HTMLPreviewHandler,
 } from "./artifacts";
 import { useChatStore } from "../store";
 import { IconButton } from "./button";
@@ -73,7 +73,7 @@ export function Mermaid(props: { code: string }) {
 
 export function PreCode(props: { children: any }) {
   const ref = useRef<HTMLPreElement>(null);
-  const previewRef = useRef<HTMLPreviewHander>(null);
+  const previewRef = useRef<HTMLPreviewHandler>(null);
   const [mermaidCode, setMermaidCode] = useState("");
   const [htmlCode, setHtmlCode] = useState("");
   const { height } = useWindowSize();