diff --git a/src/components/serverCard/serverCard.module.scss b/src/components/serverCard/serverCard.module.scss index 125f28e..aba4e23 100644 --- a/src/components/serverCard/serverCard.module.scss +++ b/src/components/serverCard/serverCard.module.scss @@ -17,8 +17,8 @@ } .frameworkIcon { - width: 27px; - height: 27px; + width: 2rem; + height: 2rem; pointer-events: none; } @@ -30,7 +30,7 @@ border-radius: 0.6rem; outline: none; cursor: pointer; - transition: background-color 0.3s ease; /* Smooth transition for color change */ + transition: background-color 0.3s ease; } .runningButton{ background-color: #8d213e; @@ -40,7 +40,7 @@ border-radius: 0.6rem; outline: none; cursor: pointer; - transition: background-color 0.3s ease; /* Smooth transition for color change */ + transition: background-color 0.3s ease; } .deleteButton{ width: 20px; diff --git a/src/pages/DashboardPage/DashboardPage.jsx b/src/pages/DashboardPage/DashboardPage.jsx index 0c1ebdd..b0e62d8 100644 --- a/src/pages/DashboardPage/DashboardPage.jsx +++ b/src/pages/DashboardPage/DashboardPage.jsx @@ -16,7 +16,10 @@ const DashboardPage = ({ user }) => { try { const ApiResponse = await serviiApi.fetchServers(); const data = ApiResponse.message; - setServers(data); + + const sortedServers = data.sort((a, b) => b.running - a.running); + setServers(sortedServers); + const userSubdomain = await getUserSubdomain(user.uid); setSubdomain(userSubdomain); } catch (error) { @@ -74,8 +77,8 @@ const DashboardPage = ({ user }) => { ) :
-
Adresse de connexions à vos serveurs : {subdomain}.servii.fr
- {servers.length === 0 ? ( +
Adresse de connexions à vos serveurs : {subdomain}.servii.fr
+ {servers.length === 0 ? ( ) : ( servers.map((server, index) => ( diff --git a/src/pages/DashboardPage/DashboardPage.module.scss b/src/pages/DashboardPage/DashboardPage.module.scss index 48d4b5c..0196573 100644 --- a/src/pages/DashboardPage/DashboardPage.module.scss +++ b/src/pages/DashboardPage/DashboardPage.module.scss @@ -17,7 +17,7 @@ html, body { } .cardsContainer { - width: 100%; + width: 50rem; margin-top: 5rem; display: flex; flex-direction: column; @@ -32,4 +32,8 @@ html, body { color: var(--text-color); font-style: italic; margin-bottom: 1.5rem; +} + +.iptitle span { + color: violet; } \ No newline at end of file