From 62d46e050551da505c2656e2b0f8471cd483f59c Mon Sep 17 00:00:00 2001 From: AntoninoP Date: Mon, 12 Aug 2024 18:35:39 +0200 Subject: [PATCH 1/2] init test fix --- src/components/CreateServer/CreateServer.jsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/CreateServer/CreateServer.jsx b/src/components/CreateServer/CreateServer.jsx index a36388b..7df5a9e 100644 --- a/src/components/CreateServer/CreateServer.jsx +++ b/src/components/CreateServer/CreateServer.jsx @@ -135,11 +135,12 @@ const CreateServer = ({ user, onCreateServer, onSubdomainUpdate, onCancel, noSer
{frameworks.map((framework, index) => ( + console.log(framework.logo.toLowerCase()), {`${framework.name} { setSelectedFramework(framework.name); setServerVersion(''); From 1921092a32e37b3eb0d7bb0cfc282f6c31f082e0 Mon Sep 17 00:00:00 2001 From: AntoninoP Date: Mon, 12 Aug 2024 18:47:09 +0200 Subject: [PATCH 2/2] fix --- src/components/CreateServer/CreateServer.jsx | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/src/components/CreateServer/CreateServer.jsx b/src/components/CreateServer/CreateServer.jsx index 7df5a9e..d7f5ef8 100644 --- a/src/components/CreateServer/CreateServer.jsx +++ b/src/components/CreateServer/CreateServer.jsx @@ -8,7 +8,6 @@ import bukkitLogo from '../../assets/frameworks/bukkit.png'; import paperLogo from '../../assets/frameworks/paper.png'; import spigotLogo from '../../assets/frameworks/spigot.png'; - const frameworks = [ { name: 'vanilla', logo: vanillaLogo }, { name: 'bukkit', logo: bukkitLogo }, @@ -39,8 +38,6 @@ const versions = { ], }; - - const CreateServer = ({ user, onCreateServer, onSubdomainUpdate, onCancel, noServers }) => { const [subdomain, setSubdomain] = useState(null); const [subdomainInput, setSubdomainInput] = useState(''); @@ -78,7 +75,7 @@ const CreateServer = ({ user, onCreateServer, onSubdomainUpdate, onCancel, noSer const handleCreateServer = async () => { try { - await onCreateServer(serverName, serverVersion , selectedFramework); + await onCreateServer(serverName, serverVersion, selectedFramework); } catch (error) { console.error('Error creating server:', error); } @@ -93,7 +90,7 @@ const CreateServer = ({ user, onCreateServer, onSubdomainUpdate, onCancel, noSer {noServers ? (
Bonjour
-
Aucun serveur
+
Aucun serveur
) : ( @@ -133,31 +130,28 @@ const CreateServer = ({ user, onCreateServer, onSubdomainUpdate, onCancel, noSer
Sélection du framework
- - {frameworks.map((framework, index) => ( - console.log(framework.logo.toLowerCase()), + {frameworks.map((framework, index) => ( {`${framework.name}`} { setSelectedFramework(framework.name); - setServerVersion(''); + setServerVersion(''); }} /> ))}
Sélection de la version
-