Skip to content

Commit db2b90e

Browse files
authored
Merge pull request #1102 from databuddy-analytics/izadoesdev/cta-labels-release
feat(dashboard): say Add your website instead of Create website
2 parents b62d734 + e740e34 commit db2b90e

13 files changed

Lines changed: 30 additions & 46 deletions

File tree

‎apps/dashboard/app/(main)/agent/_components/agent-no-websites.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export function AgentNoWebsites() {
2121
</p>
2222
</div>
2323
<Button asChild>
24-
<Link href="/websites">Add a website</Link>
24+
<Link href="/websites">Add your website</Link>
2525
</Button>
2626
</div>
2727
);

‎apps/dashboard/app/(main)/home/page.tsx‎

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ export default function HomePage() {
146146
</Button>
147147
<Button onClick={() => setDialogOpen(true)} size="sm">
148148
<PlusIcon className="size-4 shrink-0" />
149-
Create website
149+
Add website
150150
</Button>
151151
</TopBar.Actions>
152152

@@ -184,7 +184,7 @@ export default function HomePage() {
184184
</Button>
185185
) : (
186186
<Button onClick={() => setDialogOpen(true)} size="sm">
187-
Add website
187+
Add your website
188188
</Button>
189189
)}
190190
</Card>
@@ -222,7 +222,12 @@ export default function HomePage() {
222222
/>
223223
</div>
224224

225-
<div className="space-y-4">
225+
<div
226+
className={cn(
227+
"space-y-4",
228+
!(isLoading || isError) && websites.length === 0 && "hidden"
229+
)}
230+
>
226231
<div className="flex items-center justify-between">
227232
<h2 className="font-semibold text-foreground text-sm">
228233
Website snapshot
@@ -258,19 +263,6 @@ export default function HomePage() {
258263
/>
259264
)}
260265

261-
{!(isLoading || isError) && websites.length === 0 && (
262-
<EmptyState
263-
action={{
264-
label: "Create your first website",
265-
onClick: () => setDialogOpen(true),
266-
}}
267-
description="Start tracking your website analytics by adding your first website."
268-
icon={<GlobeIcon />}
269-
title="No websites yet"
270-
variant="minimal"
271-
/>
272-
)}
273-
274266
{!(isLoading || isError) && websites.length > 0 && (
275267
<div
276268
aria-live="polite"

‎apps/dashboard/app/(main)/onboarding/_components/add-website.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ export function AddWebsite({
136136
size="sm"
137137
type="submit"
138138
>
139-
{pending ? "Creating…" : "Create website"}
139+
{pending ? "Adding…" : "Add website"}
140140
</Button>
141141
</form>
142142
);

‎apps/dashboard/app/(main)/organizations/components/business-context-editor.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@ export function BusinessContextEditor({
449449
if (!selectedWebsite) {
450450
return (
451451
<Button asChild size="sm" variant="secondary">
452-
<Link href="/websites">Add a website</Link>
452+
<Link href="/websites">Add your website</Link>
453453
</Button>
454454
);
455455
}

‎apps/dashboard/app/(main)/organizations/components/workspace-websites-section.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ export function WorkspaceWebsitesSection({
101101
variant="secondary"
102102
>
103103
<PlusIcon className="size-4 shrink-0" />
104-
Create website
104+
Add website
105105
</Button>
106106
</Card.Header>
107107
<Card.Content className="p-0">
@@ -117,7 +117,7 @@ export function WorkspaceWebsitesSection({
117117
variant="secondary"
118118
>
119119
<PlusIcon className="size-4 shrink-0" />
120-
Create website
120+
Add website
121121
</Button>
122122
}
123123
description="Add your first website to start tracking analytics."

‎apps/dashboard/app/(main)/websites/[id]/page.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export default function WebsiteDetailsPage() {
3333
<EmptyState
3434
action={
3535
<Link href="/websites">
36-
<Button size="sm">Back to Websites</Button>
36+
<Button size="sm">Back to websites</Button>
3737
</Link>
3838
}
3939
description="The website you are looking for does not exist or you do not have access."

‎apps/dashboard/app/(main)/websites/page.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ export default function WebsitesPage() {
9090
size="sm"
9191
>
9292
<PlusIcon className="size-4" />
93-
Create website
93+
Add website
9494
</Button>
9595
</TopBar.Actions>
9696

@@ -125,7 +125,7 @@ export default function WebsitesPage() {
125125
websites.length === 0 && (
126126
<EmptyState
127127
action={{
128-
label: "Create your first website",
128+
label: "Add your website",
129129
onClick: () => setDialogOpen(true),
130130
}}
131131
className="h-full"

‎apps/dashboard/components/website-dialog.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ export function WebsiteDialog({
143143
<Dialog.Form onSubmit={form.handleSubmit(handleSubmit)}>
144144
<Dialog.Header>
145145
<Dialog.Title>
146-
{isEditing ? "Edit website" : "Create website"}
146+
{isEditing ? "Edit website" : "Add your website"}
147147
</Dialog.Title>
148148
<Dialog.Description>
149149
{isEditing
@@ -204,7 +204,7 @@ export function WebsiteDialog({
204204
loading={isPending}
205205
type="submit"
206206
>
207-
{isEditing ? "Save changes" : "Create website"}
207+
{isEditing ? "Save changes" : "Add website"}
208208
</Button>
209209
</Dialog.Footer>
210210
</Dialog.Form>

‎apps/dashboard/test/e2e/specs/core/onboarding.spec.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ test("sets up a fresh account from the onboarding checklist", {
3131
await domain.fill(`https://www.onboard-${suffix}.local/pricing?utm=e2e`);
3232
await expect(domain).toHaveValue(`onboard-${suffix}.local`);
3333
await expect(page.getByRole("textbox", { name: "Name" })).toHaveValue(name);
34-
await page.getByRole("button", { name: "Create website" }).click();
34+
await page.getByRole("button", { name: "Add website" }).click();
3535

3636
await expect(
3737
page.getByRole("heading", { name: `Set up ${name}` })

‎apps/dashboard/test/e2e/specs/core/website-setup.spec.ts‎

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,13 @@ test("gates a new website behind setup until its first page view", {
2020

2121
await page.goto("/websites");
2222
await expectDashboardReady(page);
23-
await page
24-
.getByRole("button", { exact: true, name: "Create website" })
25-
.click();
26-
const dialog = page.getByRole("dialog", { name: "Create website" });
23+
await page.getByRole("button", { exact: true, name: "Add website" }).click();
24+
const dialog = page.getByRole("dialog", { name: "Add your website" });
2725
await dialog.getByRole("textbox", { name: "Name" }).fill(`Gate ${suffix}`);
2826
await dialog
2927
.getByRole("textbox", { name: "Domain" })
3028
.fill(`gate-${suffix}.local`);
31-
await dialog.getByRole("button", { name: "Create website" }).click();
29+
await dialog.getByRole("button", { name: "Add website" }).click();
3230

3331
await expect(page).toHaveURL(WEBSITE_PATH_RE, { timeout: 15_000 });
3432
const websiteId = idFromPath(page.url(), "websites");

0 commit comments

Comments
 (0)