mirror of
https://github.com/hubHarmony/servii-frontend.git
synced 2024-11-17 21:40:30 +00:00
[+] Fixed basic warnings and indentation
This commit is contained in:
parent
8adffc3212
commit
5484017ba7
@ -67,8 +67,9 @@ const CreateServer = ({ user, onCreateServer, onSubdomainUpdate, onCancel, noSer
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
loadSubdomain();
|
||||
}, [user]);
|
||||
loadSubdomain().then(r => r);
|
||||
},
|
||||
[user]);
|
||||
|
||||
const handleSaveSubdomain = async () => {
|
||||
try {
|
||||
|
@ -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 }) => {
|
||||
<CreateServer
|
||||
user={user}
|
||||
onCreateServer={handleCreateServerPage}
|
||||
onSubdomainUpdate={setSubdomain}
|
||||
onCancel={handleCancelCreateServer}
|
||||
noServers
|
||||
/>
|
||||
@ -134,19 +135,19 @@ const DashboardPage = ({ user }) => {
|
||||
Créer un nouveau serveur
|
||||
</button>
|
||||
{servers.map((server) => (
|
||||
<ServerCard
|
||||
key={server.id}
|
||||
status={server.running}
|
||||
version={server.version}
|
||||
name={server.name}
|
||||
framework={server.framework}
|
||||
maxPlayers={server.maxPlayers}
|
||||
countPlayers={server.onlinePlayers}
|
||||
onRunClick={() => handleRunServer(server.name)}
|
||||
onStopClick={() => handleStopServer(server.name)}
|
||||
onDeleteClick={() => handleDeleteServer(server.name)}
|
||||
subdomain={subdomain}
|
||||
/>
|
||||
<DefaultServerCard
|
||||
key={server.id}
|
||||
status={server.running}
|
||||
version={server.version}
|
||||
name={server.name}
|
||||
framework={server.framework}
|
||||
maxPlayers={server.maxPlayers}
|
||||
countPlayers={server.onlinePlayers}
|
||||
onRunClick={() => handleRunServer(server.name)}
|
||||
onStopClick={() => handleStopServer(server.name)}
|
||||
onDeleteClick={() => handleDeleteServer(server.name)}
|
||||
subdomain={subdomain}
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
)}
|
||||
|
Loading…
Reference in New Issue
Block a user