From 2ffec40b8ce1b94561e06d5fed76a9a2841483a8 Mon Sep 17 00:00:00 2001
From: Mathias Wagner <germannewsmaker@gmail.com>
Date: Thu, 23 Nov 2023 07:50:58 +0100
Subject: [PATCH] Updated the Create.jsx page

---
 client/src/pages/Create/Create.jsx | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/client/src/pages/Create/Create.jsx b/client/src/pages/Create/Create.jsx
index 0a97f09..3fa1090 100644
--- a/client/src/pages/Create/Create.jsx
+++ b/client/src/pages/Create/Create.jsx
@@ -9,6 +9,7 @@ import {useNavigate} from "react-router";
 import Sound from "react-sound";
 import ThemeSound from "@/common/sounds/end.mp3";
 import {MusicContext} from "@/common/contexts/MusicContext.jsx";
+import {SettingsContext} from "@/common/contexts/SettingsProvider.jsx";
 
 export const DOMAIN = "pmg.gnmyt.dev";
 export const BASE_URL = `https://${DOMAIN}/join/`;
@@ -20,9 +21,10 @@ export const Create = () => {
 
     const {musicEnabled} = useContext(MusicContext);
     const {groups, resetGame} = useContext(GroupContext);
+    const {startCapital, costPerCake, costPerRound, maxProduction, maxPrice} = useContext(SettingsContext);
 
     const getRoomCode = () => {
-        socket.emit("CREATE_ROOM", undefined, (data) => {
+        socket.emit("CREATE_ROOM", {startCapital, costPerCake, costPerRound, maxProduction, maxPrice}, (data) => {
             setCode(code => code !== "LOADING" ? code : data.code);
         });
     }