Skip to content

Commit

Permalink
Prep prompts and options for sending it to the server
Browse files Browse the repository at this point in the history
  • Loading branch information
albin-karlsson committed Apr 8, 2024
1 parent 81a2d48 commit 616f42b
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion client/src/components/Council.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React, { useState, useEffect } from "react";
import io from "socket.io-client";
import globalOptions from "../global-options.json";
import FoodItem from "./FoodItem";
import Overlay from "./Overlay";
import About from "./About";
Expand All @@ -12,7 +13,7 @@ import TextOutput from "./TextOutput";
import useWindowSize from "../hooks/useWindowSize";

function Council({ options }) {
const { foods } = options;
const { foods, humanName, topic } = options;
const [activeOverlay, setActiveOverlay] = useState("");
const { width: screenWidth } = useWindowSize();

Expand All @@ -31,6 +32,20 @@ function Council({ options }) {
useEffect(() => {
const socket = io();

// Construct promps and options object

let promptsAndOptions = {
options: {
...globalOptions.options,
humanName: humanName,
raiseHandPrompt: false,
neverMindPrompt: false,
},
rooms: [{ name: "New Room", topic: topic, characters: foods }],
};

console.log(promptsAndOptions);

console.log(socket);
}, []);

Expand Down

0 comments on commit 616f42b

Please sign in to comment.