This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { Kafka } = require("kafkajs"); | |
const kafka = new Kafka({ | |
clientId: "app", | |
brokers: ["localhost:9092"], | |
}); | |
async function consumeMessages() { | |
const consumer = kafka.consumer({ groupId: "1" }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useRef, useState } from "react"; | |
export default function Modal({ visible, setVisible }) { | |
const modalRef = useRef(null); | |
return ( | |
<> | |
{visible ? ( | |
<div | |
style={{ |