Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mio-19 committed Sep 19, 2024
1 parent f411efb commit 8a50dfe
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions site/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@
import { useEffect, useRef } from "react";
import Image from "next/image";
import { XTerm } from "@pablo-lion/xterm-react";
import { WebLinksAddon } from '@xterm/addon-web-links';
import { startRepl } from "../generated/main.mjs";
import "../types/main.d.ts";
import { Terminal } from '@xterm/xterm';

export default function Home() {
const xtermRef = useRef(null);
/* eslint-disable @typescript-eslint/no-explicit-any */
const xtermRef = useRef<any>(null);

useEffect(() => {
if (xtermRef.current) {
const terminal = xtermRef.current.terminal;
terminal.loadAddon(new WebLinksAddon());
const terminal = xtermRef.current.terminal as Terminal;
startRepl(terminal);
}
}, []);
Expand Down

0 comments on commit 8a50dfe

Please sign in to comment.