apple2js/js/components/Videoterm.tsx
2022-06-15 18:44:58 -07:00

21 lines
505 B
TypeScript

import { useEffect } from 'preact/hooks';
import Apple2IO, { slot } from 'js/apple2io';
import VideotermImpl from 'js/cards/videoterm';
/**
* VideoTerm component properties
*/
export interface VideotermProps {
io: Apple2IO | undefined;
slot: slot;
}
export const Videoterm = ({ io, slot }: VideotermProps ) => {
useEffect(() => {
if (io) {
const videoterm = new VideotermImpl();
io.setSlot(slot, videoterm);
}
}, [io, slot]);
return null;
};