add functionality and refactor the code
This commit is contained in:
@@ -27,15 +27,14 @@ const Console = () => {
|
||||
const textareaRef = useRef<HTMLTextAreaElement>(null); // Dodajemy referencję do textarea
|
||||
|
||||
const setCredentials = async () => {
|
||||
setApiKey("ptlc_aDGU4VHNQuN5t6dyxNzVon3UZLR5ehuySmdR7xsUbMm");
|
||||
setApiKey("ptlc_N77A2hEczFmSwGXm4cEXh4Gw3ZP0Ygr5NaBkGlE7pjU");
|
||||
};
|
||||
|
||||
const fetchData = async (apiKey: string) => {
|
||||
console.log("Fetching data...");
|
||||
console.log(apiKey);
|
||||
try {
|
||||
const response = await fetch(
|
||||
"https://ptero.przeqpiciel.com/api/client/servers/0bf192ab/websocket",
|
||||
`${process.env.NEXT_PUBLIC_URL}/api/client/servers/ec46691a/websocket`,
|
||||
{
|
||||
method: "GET",
|
||||
headers: {
|
||||
|
||||
Reference in New Issue
Block a user