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.

update widget

Steven Tey69a4471d1d4c
diff --git a/apps/web/app/app.dub.co/(dashboard)/layout.tsx b/apps/web/app/app.dub.co/(dashboard)/layout.tsx
index 49d9d10504..b7e306aa74 100644
--- a/apps/web/app/app.dub.co/(dashboard)/layout.tsx
+++ b/apps/web/app/app.dub.co/(dashboard)/layout.tsx
@@ -4,6 +4,7 @@ import { HelpButtonRSC } from "@/ui/layout/sidebar/help-button-rsc";
import { NewsRSC } from "@/ui/layout/sidebar/news-rsc";
import { ReferButton } from "@/ui/layout/sidebar/refer-button";
import Toolbar from "@/ui/layout/toolbar/toolbar";
+import { DubWidget } from "@dub/embed-react";
import { constructMetadata } from "@dub/utils";
import { ReactNode } from "react";
@@ -27,6 +28,7 @@ export default async function Layout({ children }: { children: ReactNode }) {
{children}
</MainNav>
</div>
+ <DubWidget token="dub_embed_xxx" />
<Toolbar show={["onboarding"]} />
</>
);
diff --git a/apps/web/app/app.dub.co/embed/widget/page-client.tsx b/apps/web/app/app.dub.co/embed/widget/page-client.tsx
index 669c0e67be..2e57e05c27 100644
--- a/apps/web/app/app.dub.co/embed/widget/page-client.tsx
+++ b/apps/web/app/app.dub.co/embed/widget/page-client.tsx
@@ -54,18 +54,14 @@ export function EmbedWidgetPageClient() {
{selectedTab === "invite" && (
<>
<div className="flex flex-col gap-2">
+ <span className="text-sm text-neutral-500">Invite link</span>
{!isLoadingLink && link ? (
- <>
- <span className="text-sm text-neutral-500">
- Invite link
- </span>
- <input
- type="text"
- readOnly
- value={getPrettyUrl(link.shortLink)}
- className="xs:w-auto h-10 w-full rounded-md border border-neutral-300 px-3 text-sm focus:border-gray-500 focus:outline-none focus:ring-gray-500 lg:min-w-64 xl:min-w-72"
- />
- </>
+ <input
+ type="text"
+ readOnly
+ value={getPrettyUrl(link.shortLink)}
+ className="xs:w-auto h-10 w-full rounded-md border border-neutral-300 px-3 text-sm focus:border-gray-500 focus:outline-none focus:ring-gray-500 lg:min-w-64 xl:min-w-72"
+ />
) : (
<div className="h-10 animate-pulse rounded-md bg-neutral-200" />
)}