diff --git a/dashboard/src/main/home/database-dashboard/DatabaseDashboard.tsx b/dashboard/src/main/home/database-dashboard/DatabaseDashboard.tsx index 881e8977eb..ea55546504 100644 --- a/dashboard/src/main/home/database-dashboard/DatabaseDashboard.tsx +++ b/dashboard/src/main/home/database-dashboard/DatabaseDashboard.tsx @@ -82,25 +82,6 @@ const DatabaseDashboard: React.FC = () => { }, [datastores, searchValue, typeFilter, engineFilter]); const renderContents = (): JSX.Element => { - if (currentProject?.sandbox_enabled) { - return ( - - Datastores are coming soon to the Porter Cloud - - - You can also eject to your own cloud account to start using managed - datastores immediately. - - - - - - - ); - } - if (!currentProject?.db_enabled) { return ( @@ -343,8 +324,8 @@ export const DatastoreList: React.FC<{ return ( { - await onClick(datastore); + onClick={() => { + void onClick(datastore); }} > diff --git a/dashboard/src/main/home/sidebar/Sidebar.tsx b/dashboard/src/main/home/sidebar/Sidebar.tsx index f7fc2592b6..c252b4f154 100644 --- a/dashboard/src/main/home/sidebar/Sidebar.tsx +++ b/dashboard/src/main/home/sidebar/Sidebar.tsx @@ -1,6 +1,7 @@ import React, { Component } from "react"; import { withRouter, type RouteComponentProps } from "react-router"; import styled from "styled-components"; +import { match } from "ts-pattern"; import Container from "components/porter/Container"; import Image from "components/porter/Image"; @@ -203,8 +204,12 @@ class Sidebar extends Component { Datastores - {(currentProject.sandbox_enabled || - !currentProject.db_enabled) && } + {match(currentProject) + .with({ sandbox_enabled: true }, () => NEW) + .with({ db_enabled: false }, () => ( + + )) + .otherwise(() => null)} {this.props.isAuthorized("settings", "", [