Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

More tweaks

Tim Wilson9fe88525f99b
diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/campaigns/[campaignId]/page-client.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/campaigns/[campaignId]/page-client.tsx
index f9e632d078..34c27462ca 100644
--- a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/campaigns/[campaignId]/page-client.tsx
+++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/campaigns/[campaignId]/page-client.tsx
@@ -1,22 +1,18 @@
"use client";
-import { useMediaQuery } from "@dub/ui";
import { notFound } from "next/navigation";
-import { useState } from "react";
import useCampaign from "../use-campaign";
import { CampaignEditor } from "./campaign-editor";
import { CampaignEditorSkeleton } from "./campaign-editor-skeleton";
export function ProgramCampaignPageClient() {
- const { campaign, error, loading } = useCampaign();
- const { isMobile } = useMediaQuery();
- const [isRightPanelOpen, setIsRightPanelOpen] = useState(!isMobile);
+ const { campaign, error } = useCampaign();
if (error) {
return notFound();
}
- if (loading || !campaign) {
+ if (!campaign) {
return <CampaignEditorSkeleton />;
}
diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/campaigns/use-campaign.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/campaigns/use-campaign.tsx
index c8c9287509..960454e3c4 100644
--- a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/campaigns/use-campaign.tsx
+++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/campaigns/use-campaign.tsx
@@ -13,6 +13,9 @@ export default function useCampaign() {
? `/api/campaigns/${campaignId}?workspaceId=${workspaceId}`
: undefined,
fetcher,
+ {
+ keepPreviousData: true,
+ },
);
return {