mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-05-19 14:54:40 +01:00
17 lines
360 B
TypeScript
17 lines
360 B
TypeScript
import React, { useEffect, useRef } from "react";
|
|
import { XTerm } from "xterm-for-react";
|
|
|
|
const XTermComponent: React.FC = () => {
|
|
const xtermRef = useRef(null);
|
|
|
|
useEffect(() => {
|
|
if (xtermRef.current) {
|
|
xtermRef.current.terminal.writeln("Hello, World!");
|
|
}
|
|
}, []);
|
|
|
|
return <XTerm ref={xtermRef} />;
|
|
};
|
|
|
|
export default XTermComponent;
|