Skip to content

Commit

Permalink
feat(ui): only show deploy to free users
Browse files Browse the repository at this point in the history
  • Loading branch information
mavarius committed Dec 18, 2023
1 parent a1f6d7f commit 6666c3f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/homepageExperience/containers/HomepageContents.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Libraries
import React, {FC} from 'react'
import {useSelector} from 'react-redux'

// Components
import {
Expand All @@ -19,6 +20,9 @@ import {CloudWidgets} from 'src/me/components/CloudWidgets'
// Constants
import {CLOUD} from 'src/shared/constants'

// Selectors
import {selectCurrentIdentity} from 'src/identity/selectors'

// Utils
import {pageTitleSuffixer} from 'src/shared/utils/pageTitles'
import UsageProvider from 'src/usage/context/usage'
Expand All @@ -32,6 +36,9 @@ import {DeployAccordion} from 'src/homepageExperience/components/OptionAccordion
import 'src/homepageExperience/containers/HomepageContents.scss'

export const HomepageContents: FC = () => {
const {account} = useSelector(selectCurrentIdentity)
const freeAccount = CLOUD && account.type === 'free'

return (
<Page titleTag={pageTitleSuffixer(['Get Started'])}>
<Page.Header fullWidth={true}>
Expand Down Expand Up @@ -67,7 +74,7 @@ export const HomepageContents: FC = () => {
<AddDataAccordion />
<QueryDataAccordion />
<VisualizeAccordion />
<DeployAccordion />
{freeAccount && <DeployAccordion />}
</FlexBox.Child>
</FlexBox>
</Grid.Column>
Expand Down

0 comments on commit 6666c3f

Please sign in to comment.