mirror of
https://github.com/hubHarmony/servii-frontend.git
synced 2024-11-17 21:40:30 +00:00
add effet loading
This commit is contained in:
parent
9accc4f279
commit
ae09e7b7e4
@ -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 (
|
||||
<div className={styles.container}>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
{subdomain === null ? (
|
||||
{subdomain === '' ? (
|
||||
<div className={styles.container}>
|
||||
<div className={styles.mainCardSubdomain}>
|
||||
<div className={styles.Title}>Ecrivez votre sous domaine</div>
|
||||
|
Loading…
Reference in New Issue
Block a user