The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
Update loading state
Tim Wilson73f9105b1b65
diff --git a/apps/web/ui/partners/resources/resource-section.tsx b/apps/web/ui/partners/resources/resource-section.tsxindex 299f4f96b8..f1ac5079d9 100644--- a/apps/web/ui/partners/resources/resource-section.tsx+++ b/apps/web/ui/partners/resources/resource-section.tsx@@ -1,9 +1,8 @@"use client";-import { AnimatedSizeContainer, Button } from "@dub/ui";+import { AnimatedSizeContainer, Button, LoadingSpinner } from "@dub/ui";import { cn } from "@dub/utils";import { PropsWithChildren } from "react";-import { ResourceCardSkeleton } from "./resource-card";export function ResourceSection({resource,@@ -31,7 +30,7 @@ export function ResourceSection({</div><div className="-m-1"><AnimatedSizeContainer- height={!isLoading}+ heighttransition={{ duration: 0.2, ease: "easeInOut" }}><div@@ -40,15 +39,18 @@ export function ResourceSection({isValidating && "opacity-50",)}>- {isLoading ? <ResourceCardSkeleton /> : children}- {onAdd && (- <Button- type="button"- text={`Add ${resource}`}- onClick={onAdd}- className="h-8 w-fit px-3"- />- )}+ {children}+ <div className="flex items-center gap-4">+ {isLoading && <LoadingSpinner />}+ {onAdd && (+ <Button+ type="button"+ text={`Add ${resource}`}+ onClick={onAdd}+ className="h-8 w-fit px-3"+ />+ )}+ </div></div></AnimatedSizeContainer></div>