diff --git a/apps/web/app/app.dub.co/(dashboard)/account/settings/referrals/page-client.tsx b/apps/web/app/app.dub.co/(dashboard)/account/settings/referrals/page-client.tsx index 8c5b029e24..08504e7318 100644 --- a/apps/web/app/app.dub.co/(dashboard)/account/settings/referrals/page-client.tsx +++ b/apps/web/app/app.dub.co/(dashboard)/account/settings/referrals/page-client.tsx @@ -12,7 +12,11 @@ export function ReferralsPageClient() { const { data: session, status } = useSession(); const referralLinkId = session?.user?.["referralLinkId"]; - const { data: { publicToken } = {}, isLoading } = useSWRImmutable<{ + const { + data: { publicToken } = {}, + isLoading, + mutate, + } = useSWRImmutable<{ publicToken: string; }>(referralLinkId && "/api/user/embed-tokens", fetcher, { keepPreviousData: true, @@ -43,5 +47,11 @@ export function ReferralsPageClient() { ); } - return ; + return ( + mutate() }} + /> + ); } diff --git a/packages/embeds/react/src/example/widget.tsx b/packages/embeds/react/src/example/widget.tsx index c4d0fc8f48..7d028218e9 100644 --- a/packages/embeds/react/src/example/widget.tsx +++ b/packages/embeds/react/src/example/widget.tsx @@ -15,7 +15,7 @@ const Widget = () => { createToken(); }, []); - return ; + return ; }; ReactDom.render(, document.getElementById("root"));