The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
Update links-list.tsx
Kiran Kb6f24e49cc89
diff --git a/apps/web/app/app.dub.co/embed/referrals/links-list.tsx b/apps/web/app/app.dub.co/embed/referrals/links-list.tsxindex 46af248663..abbab8a529 100644--- a/apps/web/app/app.dub.co/embed/referrals/links-list.tsx+++ b/apps/web/app/app.dub.co/embed/referrals/links-list.tsx@@ -6,6 +6,7 @@ import { fetcher, getPrettyUrl, TAB_ITEM_ANIMATION_SETTINGS } from "@dub/utils";import { motion } from "framer-motion";import { useEffect, useState } from "react";import useSWR from "swr";+import { useEmbedToken } from "../use-embed-token";import { ReferralsEmbedLink } from "./types";interface Props {@@ -19,10 +20,11 @@ export function ReferralsEmbedLinksList({onCreateLink,onEditLink,}: Props) {+ const token = useEmbedToken();const [partnerLinks, setPartnerLinks] = useState<ReferralsEmbedLink[]>(links);const { data: refreshedLinks, isLoading } = useSWR<ReferralsEmbedLink[]>(- "/api/embed/referrals/links",+ `/api/embed/referrals/links?token=${token}`,fetcher,{keepPreviousData: true,