diff --git a/src/components/CreateServer/CreateServer.jsx b/src/components/CreateServer/CreateServer.jsx index 17ca1f1..d27f57d 100644 --- a/src/components/CreateServer/CreateServer.jsx +++ b/src/components/CreateServer/CreateServer.jsx @@ -4,7 +4,7 @@ import { getUserSubdomain } from "../../service/firebase"; import { saveSubdomain } from "../../service/serverService"; const CreateServer = ({ user, onCreateServer }) => { - const [subdomain, setSubdomain] = useState(null); + const [subdomain, setSubdomain] = useState('loading'); // Utiliser 'loading' au lieu de null const [subdomainInput, setSubdomainInput] = useState(''); const loadSubdomain = async () => { @@ -33,9 +33,16 @@ const CreateServer = ({ user, onCreateServer }) => { } }; + if (subdomain === 'loading') { + return ( +