The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
add "view pending invites" to partner members page as well
Steven Tey1d26dc5907f0
diff --git a/apps/web/app/(ee)/partners.dub.co/(dashboard)/profile/members/page-client.tsx b/apps/web/app/(ee)/partners.dub.co/(dashboard)/profile/members/page-client.tsxindex 8c05ebade5..a13ddf2089 100644--- a/apps/web/app/(ee)/partners.dub.co/(dashboard)/profile/members/page-client.tsx+++ b/apps/web/app/(ee)/partners.dub.co/(dashboard)/profile/members/page-client.tsx@@ -68,6 +68,12 @@ export function ProfileMembersPageClient() {},);+ const { data: invitesForCount } = useSWR<PartnerUserProps[]>(+ defaultPartnerId ? "/api/partner-profile/invites" : null,+ fetcher,+ );+ const inviteCount = invitesForCount?.length ?? 0;+const isCurrentUserOwner = partner?.role === "owner";const { InvitePartnerUserModal, setShowInvitePartnerUserModal } =@@ -236,14 +242,36 @@ export function ProfileMembersPageClient() {)}>- <PageWidthWrapper className="mb-20 flex flex-col gap-4">+ <PageWidthWrapper className="mb-20 flex flex-col gap-2"><div className="flex justify-between gap-3">- <Filter.Select- filters={filters}- activeFilters={activeFilters}- onSelect={onSelect}- onRemove={onRemove}- />+ <div className="flex items-center gap-2">+ <Filter.Select+ filters={filters}+ activeFilters={activeFilters}+ onSelect={onSelect}+ onRemove={onRemove}+ />+ {inviteCount && status !== "invited" ? (+ <Button+ text="View pending invites"+ variant="secondary"+ className="w-fit"+ right={+ <span+ className={cn(+ "rounded-full px-1.5 py-0.5 text-xs font-medium",+ "bg-neutral-200 text-neutral-700",+ )}+ >+ {inviteCount}+ </span>+ }+ onClick={() =>+ queryParams({ set: { status: "invited" }, del: "page" })+ }+ />+ ) : undefined}+ </div><SearchBoxPersistedplaceholder="Search by name or email"inputClassName="w-full md:w-[20rem]"diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/members/page-client.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/members/page-client.tsxindex 73a25c07f4..8a5a919e31 100644--- a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/members/page-client.tsx+++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/members/page-client.tsx@@ -291,7 +291,7 @@ export function WorkspaceMembersClient() {onSelect={onSelect}onRemove={onRemove}/>- {inviteCount > 0 && status !== "invited" && (+ {inviteCount && status !== "invited" ? (<Buttontext="View pending invites"variant="secondary"@@ -307,7 +307,7 @@ export function WorkspaceMembersClient() {queryParams({ set: { status: "invited" }, del: "page" })}/>- )}+ ) : undefined}</div><SearchBoxPersistedplaceholder="Search by name or email"