mirror of
https://github.com/warmbly/warmbly.git
synced 2026-10-29 00:02:56 +00:00
feat: fix the Steps tab still pointing at /sequences and replace remaining user-facing Sequences with Steps (route page + folder renamed to steps, document title regex, permission labels, not-found hint, campaign count)
This commit is contained in:
@@ -24,7 +24,7 @@ import { usePresenceResource } from "@/hooks/PresenceProvider";
|
||||
const TABS = [
|
||||
{ label: "Overview", path: "", Icon: BarChart3Icon },
|
||||
{ label: "Leads", path: "/leads", Icon: UsersIcon },
|
||||
{ label: "Steps", path: "/sequences", Icon: ListChecksIcon },
|
||||
{ label: "Steps", path: "/steps", Icon: ListChecksIcon },
|
||||
{ label: "Schedule", path: "/schedule", Icon: CalendarIcon },
|
||||
{ label: "Settings", path: "/preferences", Icon: Settings2Icon },
|
||||
] as const;
|
||||
|
||||
+6
-6
@@ -9,20 +9,20 @@ import useCreateSequence from "@/lib/api/hooks/app/campaigns/sequences/useCreate
|
||||
import type { AppError } from "@/lib/api/client/normalizeError";
|
||||
import buildError from "@/lib/helper/buildError";
|
||||
|
||||
export default function CampaignSequences() {
|
||||
export default function CampaignSteps() {
|
||||
const campaign = useCampaign();
|
||||
if (!campaign) {
|
||||
throw new Error("CampaignSequences cannot be rendered without a campaign");
|
||||
throw new Error("CampaignSteps cannot be rendered without a campaign");
|
||||
}
|
||||
|
||||
return (
|
||||
<React.Suspense fallback={<SequencesSkeleton />}>
|
||||
<SequencesBuilder campaignId={campaign.id} />
|
||||
<React.Suspense fallback={<StepsSkeleton />}>
|
||||
<StepsBuilder campaignId={campaign.id} />
|
||||
</React.Suspense>
|
||||
);
|
||||
}
|
||||
|
||||
function SequencesBuilder({ campaignId }: { campaignId: string }) {
|
||||
function StepsBuilder({ campaignId }: { campaignId: string }) {
|
||||
const { data: sequences } = useSequences(campaignId);
|
||||
const createSequence = useCreateSequence(campaignId);
|
||||
const [creating, setCreating] = React.useState(false);
|
||||
@@ -74,6 +74,6 @@ function SequencesBuilder({ campaignId }: { campaignId: string }) {
|
||||
return <CampaignFlow campaignId={campaignId} />;
|
||||
}
|
||||
|
||||
function SequencesSkeleton() {
|
||||
function StepsSkeleton() {
|
||||
return <div className="h-[74dvh] w-full animate-pulse rounded-md border border-slate-200 bg-slate-100/60" />;
|
||||
}
|
||||
@@ -324,7 +324,7 @@ export default function CampaignsPage() {
|
||||
? "Loading…"
|
||||
: campaignsData.isError
|
||||
? "Failed to load"
|
||||
: `${campaigns.length} ${campaigns.length === 1 ? "sequence" : "sequences"}`
|
||||
: `${campaigns.length} ${campaigns.length === 1 ? "campaign" : "campaigns"}`
|
||||
}
|
||||
>
|
||||
<TopbarAction
|
||||
|
||||
@@ -16,7 +16,7 @@ import { cn } from "@/lib/utils";
|
||||
|
||||
const dests = [
|
||||
{ title: "Accounts", url: "/app/emails", icon: MailIcon, hint: "mailboxes & senders" },
|
||||
{ title: "Campaigns", url: "/app/campaigns", icon: MegaphoneIcon, hint: "sequences & sends" },
|
||||
{ title: "Campaigns", url: "/app/campaigns", icon: MegaphoneIcon, hint: "steps & sends" },
|
||||
{ title: "Contacts", url: "/app/contacts", icon: UsersIcon, hint: "people & lists" },
|
||||
{ title: "Analytics", url: "/app/analytics", icon: BarChart3Icon, hint: "opens, clicks, replies" },
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user