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
@@ -22,7 +22,7 @@ export function TimezoneSelect({
|
||||
...props
|
||||
}: SelectProps & { variant?: "default" | "minimal" }) {
|
||||
const [cities, setCities] = useState<ICity[]>([]);
|
||||
const { data, isLoading } = trpc.viewer.public.cityTimezones.useQuery(undefined, {
|
||||
const { data, isPending } = trpc.viewer.public.cityTimezones.useQuery(undefined, {
|
||||
trpc: { context: { skipBatch: true } },
|
||||
});
|
||||
const handleInputChange = (tz: string) => {
|
||||
@@ -39,8 +39,8 @@ export function TimezoneSelect({
|
||||
<BaseSelect
|
||||
value={value}
|
||||
className={className}
|
||||
isLoading={isLoading}
|
||||
isDisabled={isLoading}
|
||||
isLoading={isPending}
|
||||
isDisabled={isPending}
|
||||
{...reactSelectProps}
|
||||
timezones={{
|
||||
...(data ? addCitiesToDropdown(data) : {}),
|
||||
|
||||
@@ -57,7 +57,7 @@ The `TimezoneSelect` component can be used to display timezone options.
|
||||
"Timezone 2": "City 2",
|
||||
"Timezone 3": "City 3",
|
||||
},
|
||||
isLoading: false,
|
||||
isPending: false,
|
||||
}}
|
||||
argTypes={{
|
||||
value: {
|
||||
|
||||
@@ -14,9 +14,9 @@ type DefaultStep = {
|
||||
containerClassname?: string;
|
||||
contentClassname?: string;
|
||||
description: string;
|
||||
content?: ((setIsLoading: Dispatch<SetStateAction<boolean>>) => JSX.Element) | JSX.Element;
|
||||
content?: ((setIsPending: Dispatch<SetStateAction<boolean>>) => JSX.Element) | JSX.Element;
|
||||
isEnabled?: boolean;
|
||||
isLoading?: boolean;
|
||||
isPending?: boolean;
|
||||
};
|
||||
|
||||
function WizardForm<T extends DefaultStep>(props: {
|
||||
@@ -37,10 +37,10 @@ function WizardForm<T extends DefaultStep>(props: {
|
||||
const setStep = (newStep: number) => {
|
||||
router.replace(`${href}?step=${newStep || 1}`);
|
||||
};
|
||||
const [currentStepIsLoading, setCurrentStepIsLoading] = useState(false);
|
||||
const [currentStepisPending, setCurrentStepisPending] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
setCurrentStepIsLoading(false);
|
||||
setCurrentStepisPending(false);
|
||||
}, [currentStep]);
|
||||
|
||||
return (
|
||||
@@ -67,7 +67,7 @@ function WizardForm<T extends DefaultStep>(props: {
|
||||
<div className={classNames("mb-8 overflow-hidden md:w-[700px]", props.containerClassname)}>
|
||||
<div className={classNames("print:p-none max-w-3xl px-8 py-5 sm:p-6", currentStep.contentClassname)}>
|
||||
{typeof currentStep.content === "function"
|
||||
? currentStep.content(setCurrentStepIsLoading)
|
||||
? currentStep.content(setCurrentStepisPending)
|
||||
: currentStep.content}
|
||||
</div>
|
||||
{!props.disableNavigation && (
|
||||
@@ -84,7 +84,7 @@ function WizardForm<T extends DefaultStep>(props: {
|
||||
|
||||
<Button
|
||||
tabIndex={0}
|
||||
loading={currentStepIsLoading}
|
||||
loading={currentStepisPending}
|
||||
type="submit"
|
||||
color="primary"
|
||||
form={`wizard-step-${step}`}
|
||||
|
||||
@@ -29,8 +29,8 @@ const steps = [
|
||||
{
|
||||
title: "Step 2",
|
||||
description: "Description 2",
|
||||
content: (setIsLoading: (value: boolean) => void) => (
|
||||
<button data-testid="content-2" onClick={() => setIsLoading(true)}>
|
||||
content: (setIsPending: (value: boolean) => void) => (
|
||||
<button data-testid="content-2" onClick={() => setIsPending(true)}>
|
||||
Test
|
||||
</button>
|
||||
),
|
||||
|
||||
Reference in new issue
Block a user