update prettier config
This commit is contained in:
@ -37,7 +37,7 @@ const setTwilioWebhooks = Queue<Payload>(
|
||||
voiceApplicationSid: twimlAppSid,
|
||||
}),
|
||||
]);
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
export default setTwilioWebhooks;
|
||||
|
@ -65,7 +65,7 @@ const OnboardingLayout: FunctionComponent<Props> = ({ children, currentStep, pre
|
||||
key={step}
|
||||
className={clsx(
|
||||
stepIdx !== steps.length - 1 ? "pr-20 sm:pr-32" : "",
|
||||
"relative"
|
||||
"relative",
|
||||
)}
|
||||
>
|
||||
{isComplete ? (
|
||||
|
@ -20,7 +20,7 @@ export default resolver.pipe(
|
||||
const customerId = customer!.id;
|
||||
const phoneNumbers = await twilio(
|
||||
customer!.accountSid!,
|
||||
customer!.authToken!
|
||||
customer!.authToken!,
|
||||
).incomingPhoneNumbers.list();
|
||||
const phoneNumber = phoneNumbers.find((phoneNumber) => phoneNumber.sid === phoneNumberSid)!;
|
||||
await db.phoneNumber.create({
|
||||
@ -36,5 +36,5 @@ export default resolver.pipe(
|
||||
fetchCallsQueue.enqueue({ customerId }, { id: `fetch-messages-${customerId}` }),
|
||||
setTwilioWebhooks.enqueue({ customerId }, { id: `set-twilio-webhooks-${customerId}` }),
|
||||
]);
|
||||
}
|
||||
},
|
||||
);
|
||||
|
@ -22,5 +22,5 @@ export default resolver.pipe(
|
||||
authToken: twilioAuthToken,
|
||||
},
|
||||
});
|
||||
}
|
||||
},
|
||||
);
|
||||
|
@ -70,7 +70,7 @@ const StepThree: BlitzPage<Props> = ({ availablePhoneNumbers }) => {
|
||||
className={clsx(
|
||||
"max-w-[240px] mt-6 mx-auto w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 text-base font-medium text-white focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-500 sm:text-sm",
|
||||
!isSubmitting && "bg-primary-600 hover:bg-primary-700",
|
||||
isSubmitting && "bg-primary-400 cursor-not-allowed"
|
||||
isSubmitting && "bg-primary-400 cursor-not-allowed",
|
||||
)}
|
||||
>
|
||||
Save
|
||||
@ -131,7 +131,7 @@ export const getServerSideProps: GetServerSideProps<Props> = async ({ req, res }
|
||||
|
||||
const incomingPhoneNumbers = await twilio(
|
||||
customer.accountSid,
|
||||
customer.authToken
|
||||
customer.authToken,
|
||||
).incomingPhoneNumbers.list();
|
||||
const phoneNumbers = incomingPhoneNumbers.map(({ phoneNumber, sid }) => ({ phoneNumber, sid }));
|
||||
|
||||
|
@ -1,7 +1,8 @@
|
||||
import type { FunctionComponent } from "react";
|
||||
import { Suspense, useEffect } from "react";
|
||||
import type { BlitzPage, GetServerSideProps } from "blitz";
|
||||
import { getSession, Routes, useMutation, useRouter } from "blitz";
|
||||
import clsx from "clsx";
|
||||
import { useEffect } from "react";
|
||||
import { useForm } from "react-hook-form";
|
||||
|
||||
import db from "db";
|
||||
@ -80,7 +81,7 @@ const StepTwo: BlitzPage = () => {
|
||||
className={clsx(
|
||||
"max-w-[240px] mx-auto w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 text-base font-medium text-white focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-500 sm:text-sm",
|
||||
!isSubmitting && "bg-primary-600 hover:bg-primary-700",
|
||||
isSubmitting && "bg-primary-400 cursor-not-allowed"
|
||||
isSubmitting && "bg-primary-400 cursor-not-allowed",
|
||||
)}
|
||||
>
|
||||
Save
|
||||
@ -90,7 +91,15 @@ const StepTwo: BlitzPage = () => {
|
||||
);
|
||||
};
|
||||
|
||||
StepTwo.getLayout = function StepTwoLayout(page) {
|
||||
StepTwo.getLayout = (page) => {
|
||||
return (
|
||||
<Suspense fallback="Silence, ca pousse">
|
||||
<StepTwoLayout>{page}</StepTwoLayout>
|
||||
</Suspense>
|
||||
);
|
||||
};
|
||||
|
||||
const StepTwoLayout: FunctionComponent = ({ children }) => {
|
||||
const { customer } = useCurrentCustomer();
|
||||
const initialAuthToken = customer?.authToken ?? "";
|
||||
const initialAccountSid = customer?.accountSid ?? "";
|
||||
@ -106,7 +115,7 @@ StepTwo.getLayout = function StepTwoLayout(page) {
|
||||
}
|
||||
previous={{ href: Routes.StepOne().pathname, label: "Back" }}
|
||||
>
|
||||
{page}
|
||||
{children}
|
||||
</OnboardingLayout>
|
||||
);
|
||||
};
|
||||
|
Reference in New Issue
Block a user