chore: bump @trpc/* and @tanstack/react-query (#13335)
Co-authored-by: Peer Richelsen <[email protected]> Co-authored-by: Omar López <[email protected]> Co-authored-by: CarinaWolli <[email protected]> Co-authored-by: Alex van Andel <[email protected]> Co-authored-by: zomars <[email protected]> Co-authored-by: Udit Takkar <[email protected]> Co-authored-by: Benny Joo <[email protected]> Co-authored-by: Carina Wollendorfer <[email protected]> Co-authored-by: Gergő Móricz <[email protected]> Co-authored-by: Keith Williams <[email protected]>
This commit is contained in:
183 files changed
+1203
-1013
No files matched your search
@@ -33,7 +33,7 @@ export function DeleteBulkUsers({ users, onRemove }: Props) {
|
||||
variety="danger"
|
||||
title={t("remove_users_from_org")}
|
||||
confirmBtnText={t("remove")}
|
||||
isLoading={deleteMutation.isLoading}
|
||||
isPending={deleteMutation.isPending}
|
||||
onConfirm={() => {
|
||||
deleteMutation.mutateAsync({
|
||||
userIds: selectedRows.map((user) => user.id),
|
||||
|
||||
@@ -106,7 +106,7 @@ export function TeamListBulkAction({ table }: Props) {
|
||||
</Command>
|
||||
<div className="my-1.5 flex w-full">
|
||||
<Button
|
||||
loading={mutation.isLoading}
|
||||
loading={mutation.isPending}
|
||||
className="ml-auto mr-1.5 rounded-md"
|
||||
size="sm"
|
||||
onClick={async () => {
|
||||
|
||||
@@ -18,7 +18,7 @@ export function EditUserSheet({ state, dispatch }: { state: State; dispatch: Dis
|
||||
const { user: selectedUser } = state.editSheet;
|
||||
const orgBranding = useOrgBranding();
|
||||
const [editMode, setEditMode] = useEditMode((state) => [state.editMode, state.setEditMode], shallow);
|
||||
const { data: loadedUser, isLoading } = trpc.viewer.organizations.getUser.useQuery({
|
||||
const { data: loadedUser, isPending } = trpc.viewer.organizations.getUser.useQuery({
|
||||
userId: selectedUser?.id,
|
||||
});
|
||||
|
||||
@@ -36,7 +36,7 @@ export function EditUserSheet({ state, dispatch }: { state: State; dispatch: Dis
|
||||
dispatch({ type: "CLOSE_MODAL" });
|
||||
}}>
|
||||
<SheetContent position="right" size="default">
|
||||
{!isLoading && loadedUser ? (
|
||||
{!isPending && loadedUser ? (
|
||||
<div className="flex h-full flex-col">
|
||||
{!editMode ? (
|
||||
<div className="flex-grow">
|
||||
@@ -48,12 +48,12 @@ export function EditUserSheet({ state, dispatch }: { state: State; dispatch: Dis
|
||||
imageSrc={avatarURL}
|
||||
/>
|
||||
<div className="space-between flex flex-col leading-none">
|
||||
<Skeleton loading={isLoading} as="p" waitForTranslation={false}>
|
||||
<Skeleton loading={isPending} as="p" waitForTranslation={false}>
|
||||
<span className="text-emphasis text-lg font-semibold">
|
||||
{loadedUser?.name ?? "Nameless User"}
|
||||
</span>
|
||||
</Skeleton>
|
||||
<Skeleton loading={isLoading} as="p" waitForTranslation={false}>
|
||||
<Skeleton loading={isPending} as="p" waitForTranslation={false}>
|
||||
<p className="subtle text-sm font-normal">
|
||||
{orgBranding?.fullDomain ?? WEBAPP_URL}/{loadedUser?.username}
|
||||
</p>
|
||||
|
||||
@@ -7,7 +7,7 @@ import { useEditMode } from "./store";
|
||||
function EditModeFooter() {
|
||||
const { t } = useLocale();
|
||||
const setEditMode = useEditMode((state) => state.setEditMode);
|
||||
const isLoading = useEditMode((state) => state.mutationLoading);
|
||||
const isPending = useEditMode((state) => state.mutationLoading);
|
||||
|
||||
return (
|
||||
<>
|
||||
@@ -21,7 +21,7 @@ function EditModeFooter() {
|
||||
{t("cancel")}
|
||||
</Button>
|
||||
|
||||
<Button type="submit" className="w-full justify-center" form="edit-user-form" loading={isLoading}>
|
||||
<Button type="submit" className="w-full justify-center" form="edit-user-form" loading={isPending}>
|
||||
{t("update")}
|
||||
</Button>
|
||||
</>
|
||||
|
||||
@@ -61,7 +61,7 @@ export function InviteMemberModal(props: Props) {
|
||||
teamId={orgId}
|
||||
isOrg={true}
|
||||
justEmailInvites={!!orgId}
|
||||
isLoading={inviteMemberMutation.isLoading}
|
||||
isPending={inviteMemberMutation.isPending}
|
||||
onSubmit={(values) => {
|
||||
inviteMemberMutation.mutate({
|
||||
teamId: orgId,
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
import { keepPreviousData } from "@tanstack/react-query";
|
||||
import type { ColumnDef } from "@tanstack/react-table";
|
||||
import { Plus } from "lucide-react";
|
||||
import { useSession } from "next-auth/react";
|
||||
import { useMemo, useRef, useCallback, useEffect, useReducer } from "react";
|
||||
import { useCallback, useEffect, useMemo, useReducer, useRef } from "react";
|
||||
|
||||
import { WEBAPP_URL } from "@calcom/lib/constants";
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
import type { MembershipRole } from "@calcom/prisma/enums";
|
||||
import { trpc } from "@calcom/trpc";
|
||||
import { Avatar, Badge, Button, DataTable, Checkbox } from "@calcom/ui";
|
||||
import { Avatar, Badge, Button, Checkbox, DataTable } from "@calcom/ui";
|
||||
|
||||
import { useOrgBranding } from "../../../ee/organizations/context/provider";
|
||||
import { DeleteBulkUsers } from "./BulkActions/DeleteBulkUsers";
|
||||
@@ -114,14 +115,14 @@ export function UserListTable() {
|
||||
const { t } = useLocale();
|
||||
const orgBranding = useOrgBranding();
|
||||
|
||||
const { data, isLoading, fetchNextPage, isFetching } =
|
||||
const { data, isPending, fetchNextPage, isFetching } =
|
||||
trpc.viewer.organizations.listMembers.useInfiniteQuery(
|
||||
{
|
||||
limit: 10,
|
||||
},
|
||||
{
|
||||
getNextPageParam: (lastPage) => lastPage.nextCursor,
|
||||
keepPreviousData: true,
|
||||
placeholderData: keepPreviousData,
|
||||
}
|
||||
);
|
||||
|
||||
@@ -329,7 +330,7 @@ export function UserListTable() {
|
||||
}
|
||||
columns={memorisedColumns}
|
||||
data={flatData}
|
||||
isLoading={isLoading}
|
||||
isPending={isPending}
|
||||
onScroll={(e) => fetchMoreOnBottomReached(e.target as HTMLDivElement)}
|
||||
filterableItems={[
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user