Skip to content

Commit 25f943a

Browse files
committed
Add
1 parent 8cbfc91 commit 25f943a

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

apps/builder/app/builder/features/topbar/domain-checkbox.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ const DomainCheckbox = (props: DomainCheckboxProps) => {
3232
<>
3333
<br />
3434
<br />
35-
Upgrade to Pro to be able to publish to each domain individually.
35+
Upgrade to Pro account to publish to each domain individually.
3636
<br /> <br />
3737
<Link
3838
className={buttonStyle({ color: "gradient" })}

apps/builder/app/builder/features/topbar/publish.tsx

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ const ChangeProjectDomain = ({
7070
}: ChangeProjectDomainProps) => {
7171
const id = useId();
7272
const publishedOrigin = useStore($publishedOrigin);
73+
const hasProPlan = useStore($userPlanFeatures).hasProPlan;
7374

7475
const [domain, setDomain] = useState(project.domain);
7576
const [error, setError] = useState<string>();
@@ -111,15 +112,19 @@ const ChangeProjectDomain = ({
111112
status: "PENDING" as const,
112113
};
113114

115+
const hideDomainCheckbox = project.domainsVirtual.length === 0 && hasProPlan;
116+
114117
return (
115118
<CollapsibleDomainSection
116119
title={new URL(publishedOrigin).host}
117120
prefix={
118-
<DomainCheckbox
119-
defaultChecked={project.latestBuildVirtual?.domain === domain}
120-
buildId={project.latestBuildVirtual?.buildId}
121-
domain={domain}
122-
></DomainCheckbox>
121+
hideDomainCheckbox ? null : (
122+
<DomainCheckbox
123+
defaultChecked={project.latestBuildVirtual?.domain === domain}
124+
buildId={project.latestBuildVirtual?.buildId}
125+
domain={domain}
126+
></DomainCheckbox>
127+
)
123128
}
124129
suffix={
125130
<Grid flow="column" align="center">
@@ -521,7 +526,7 @@ const Content = (props: {
521526
<Text variant="regularBold" inline>
522527
Upgrade to a Pro account
523528
</Text>{" "}
524-
to add unlimited domains.
529+
to add unlimited domains and publish to each domain individually.
525530
</Text>
526531
<Link
527532
className={buttonStyle({ color: "gradient" })}

0 commit comments

Comments
 (0)