diff --git a/src/components/CreateServer/CreateServer.jsx b/src/components/CreateServer/CreateServer.jsx
index 5f19719..865621d 100644
--- a/src/components/CreateServer/CreateServer.jsx
+++ b/src/components/CreateServer/CreateServer.jsx
@@ -67,8 +67,9 @@ const CreateServer = ({ user, onCreateServer, onSubdomainUpdate, onCancel, noSer
};
useEffect(() => {
- loadSubdomain();
- }, [user]);
+ loadSubdomain().then(r => r);
+ },
+ [user]);
const handleSaveSubdomain = async () => {
try {
diff --git a/src/pages/DashboardPage/DashboardPage.jsx b/src/pages/DashboardPage/DashboardPage.jsx
index adde911..2526645 100644
--- a/src/pages/DashboardPage/DashboardPage.jsx
+++ b/src/pages/DashboardPage/DashboardPage.jsx
@@ -1,5 +1,5 @@
import { useEffect, useState } from 'react';
-import ServerCard from '../../components/serverCard/serverCard';
+import DefaultServerCard from '../../components/serverCards/DefaultServerCard.jsx';
import Navbar from '../../components/navbar/Navbar';
import styles from './DashboardPage.module.scss';
import Loading from '../Loading/loading';
@@ -87,7 +87,7 @@ const DashboardPage = ({ user }) => {
const handleCopyAddress = () => {
const address = `${subdomain}.servii.fr`;
- navigator.clipboard.writeText(address)
+ navigator.clipboard.writeText(address).then(r => r)
};
@@ -116,6 +116,7 @@ const DashboardPage = ({ user }) => {
@@ -134,19 +135,19 @@ const DashboardPage = ({ user }) => {
Créer un nouveau serveur
{servers.map((server) => (
- handleRunServer(server.name)}
- onStopClick={() => handleStopServer(server.name)}
- onDeleteClick={() => handleDeleteServer(server.name)}
- subdomain={subdomain}
- />
+ handleRunServer(server.name)}
+ onStopClick={() => handleStopServer(server.name)}
+ onDeleteClick={() => handleDeleteServer(server.name)}
+ subdomain={subdomain}
+ />
))}
)}