Skip to content

Commit 8a688d3

Browse files
committed
Update links-list.tsx
1 parent 681a268 commit 8a688d3

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

apps/web/app/app.dub.co/embed/referrals/links-list.tsx

+5-1
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,12 @@ export function ReferralsEmbedLinksList({
2121
}: Props) {
2222
const [partnerLinks, setPartnerLinks] = useState<ReferralsEmbedLink[]>(links);
2323

24-
const { data: refreshedLinks } = useSWR<ReferralsEmbedLink[]>(
24+
const { data: refreshedLinks, isLoading } = useSWR<ReferralsEmbedLink[]>(
2525
"/api/embed/referrals/links",
2626
fetcher,
27+
{
28+
keepPreviousData: true,
29+
},
2730
);
2831

2932
useEffect(() => {
@@ -122,6 +125,7 @@ export function ReferralsEmbedLinksList({
122125
thClassName: "border-l-0",
123126
tdClassName: "border-l-0",
124127
resourceName: (plural) => `link${plural ? "s" : ""}`,
128+
loading: isLoading,
125129
});
126130

127131
return (

0 commit comments

Comments
 (0)