Merge pull request #6581 from kahirokunn/fix-typo

fix typo
This commit is contained in:
RiverRay
2025-07-23 22:29:40 +08:00
committed by GitHub
2 changed files with 5 additions and 5 deletions

View File

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

View File

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