diff --git a/src/components/CreateServer/CreateServer.jsx b/src/components/CreateServer/CreateServer.jsx index 70108fc..8e9c17e 100644 --- a/src/components/CreateServer/CreateServer.jsx +++ b/src/components/CreateServer/CreateServer.jsx @@ -3,7 +3,7 @@ import styles from './CreateServer.module.scss'; import { getUserSubdomain } from "../../service/firebase"; import serviiApi from "../../service/api.tsx"; -const CreateServer = ({ user, onCreateServer, onSubdomainUpdate }) => { +const CreateServer = ({ user, onCreateServer, onSubdomainUpdate, onCancel }) => { const [subdomain, setSubdomain] = useState(null); const [subdomainInput, setSubdomainInput] = useState(''); const [serverName, setServerName] = useState(''); @@ -71,6 +71,9 @@ const CreateServer = ({ user, onCreateServer, onSubdomainUpdate }) => { + ) : ( @@ -98,6 +101,9 @@ const CreateServer = ({ user, onCreateServer, onSubdomainUpdate }) => { + diff --git a/src/pages/DashboardPage/DashboardPage.jsx b/src/pages/DashboardPage/DashboardPage.jsx index 2b286af..071b8df 100644 --- a/src/pages/DashboardPage/DashboardPage.jsx +++ b/src/pages/DashboardPage/DashboardPage.jsx @@ -54,6 +54,10 @@ const DashboardPage = ({ user }) => { setShowCreateServer(true); }; + const handleCancelCreateServer = () => { + setShowCreateServer(false); + }; + const handleRunServer = async (serverName) => { try { await serviiApi.serverRun(serverName); @@ -94,7 +98,12 @@ const DashboardPage = ({ user }) => {
{showCreateServer ? ( - + ) : (
{servers.length === 0 ? (