Skip to content

Commit

Permalink
properly unblock datastores for sandbox (#4642)
Browse files Browse the repository at this point in the history
  • Loading branch information
Feroze Mohideen authored May 14, 2024
1 parent a95f47d commit d1704a0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ const DatabaseDashboard: React.FC = () => {
}, [datastores, searchValue, typeFilter]);

const renderContents = (): JSX.Element => {
if (!currentProject?.db_enabled) {
if (!currentProject?.sandbox_enabled && !currentProject?.db_enabled) {
return (
<DashboardPlaceholder>
<Text size={16}>Datastores are not enabled for this project</Text>
Expand Down
6 changes: 6 additions & 0 deletions dashboard/src/main/home/sidebar/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,12 @@ class Sidebar extends Component<PropsType, StateType> {
<Img src={database} />
Datastores
</Container>
{match(currentProject)
.with({ sandbox_enabled: true }, () => <Badge>NEW</Badge>)
.with({ db_enabled: false }, () => (
<Image size={15} src={lock}></Image>
))
.otherwise(() => null)}
</Container>
</NavButton>
{!currentProject.sandbox_enabled && (
Expand Down

0 comments on commit d1704a0

Please sign in to comment.