upgrade to remix 1.14
This commit is contained in:
parent
f392bd8af0
commit
aee8ded63a
@ -5,7 +5,7 @@ import Button from "../button";
|
||||
import SettingsSection from "../settings-section";
|
||||
import Alert from "~/features/core/components/alert";
|
||||
import useSession from "~/features/core/hooks/use-session";
|
||||
import type { PhoneSettingsLoaderData } from "~/features/settings/loaders/phone";
|
||||
import type loader from "~/features/settings/loaders/phone";
|
||||
import type { SetPhoneNumberActionData } from "~/features/settings/actions/phone";
|
||||
import clsx from "clsx";
|
||||
|
||||
@ -13,8 +13,8 @@ export default function PhoneNumberForm() {
|
||||
const { twilio } = useSession();
|
||||
const fetcher = useFetcher();
|
||||
const transition = useTransition();
|
||||
const actionData = useActionData<SetPhoneNumberActionData>()?.setPhoneNumber;
|
||||
const availablePhoneNumbers = useLoaderData<PhoneSettingsLoaderData>().phoneNumbers;
|
||||
const actionData = useActionData<any>()?.setPhoneNumber;
|
||||
const availablePhoneNumbers = useLoaderData<typeof loader>().phoneNumbers;
|
||||
|
||||
const actionSubmitted = transition.submission?.formData.get("_action");
|
||||
const isCurrentFormTransition =
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { type LoaderFunction, json } from "@remix-run/node";
|
||||
import { type LoaderArgs, json } from "@remix-run/node";
|
||||
import { type PhoneNumber, Prisma } from "@prisma/client";
|
||||
|
||||
import db from "~/utils/db.server";
|
||||
@ -12,11 +12,11 @@ export type PhoneSettingsLoaderData = {
|
||||
phoneNumbers: Pick<PhoneNumber, "id" | "number" | "isCurrent">[];
|
||||
};
|
||||
|
||||
const loader: LoaderFunction = async ({ request }) => {
|
||||
const loader = async ({ request }: LoaderArgs) => {
|
||||
const { organization, twilio } = await requireLoggedIn(request);
|
||||
if (!twilio) {
|
||||
logger.warn("Twilio account is not connected");
|
||||
return json<PhoneSettingsLoaderData>({ phoneNumbers: [] });
|
||||
return json({ phoneNumbers: [] });
|
||||
}
|
||||
|
||||
const phoneNumbers = await db.phoneNumber.findMany({
|
||||
@ -25,7 +25,7 @@ const loader: LoaderFunction = async ({ request }) => {
|
||||
orderBy: { id: Prisma.SortOrder.desc },
|
||||
});
|
||||
|
||||
return json<PhoneSettingsLoaderData>({
|
||||
return json({
|
||||
accountSid: twilio.accountSid,
|
||||
authToken: decrypt(twilio.authToken),
|
||||
phoneNumbers,
|
||||
|
@ -1,4 +1,4 @@
|
||||
import type { AssetsManifest } from "@remix-run/react/entry";
|
||||
import type { AssetsManifest } from "@remix-run/react/dist/entry";
|
||||
|
||||
declare const ASSET_CACHE: string;
|
||||
declare const self: ServiceWorkerGlobalScope;
|
||||
|
13674
package-lock.json
generated
13674
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
12
package.json
12
package.json
@ -32,9 +32,9 @@
|
||||
"@maizzle/framework": "3.7.3",
|
||||
"@prisma/client": "3.14.0",
|
||||
"@react-aria/interactions": "3.9.0",
|
||||
"@remix-run/express": "1.5.1",
|
||||
"@remix-run/node": "1.5.1",
|
||||
"@remix-run/react": "1.5.1",
|
||||
"@remix-run/express": "1.14.3",
|
||||
"@remix-run/node": "1.14.3",
|
||||
"@remix-run/react": "1.14.3",
|
||||
"@sentry/browser": "7.3.0",
|
||||
"@sentry/node": "7.3.0",
|
||||
"@sentry/tracing": "7.3.0",
|
||||
@ -67,7 +67,7 @@
|
||||
"remix-utils": "3.2.0",
|
||||
"secure-password": "4.0.0",
|
||||
"stripe": "9.5.0",
|
||||
"superjson-remix": "0.1.2",
|
||||
"superjson-remix": "0.2.0",
|
||||
"tiny-invariant": "1.2.0",
|
||||
"tslog": "3.3.3",
|
||||
"twilio": "3.77.1",
|
||||
@ -76,8 +76,8 @@
|
||||
"zod": "3.17.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@remix-run/dev": "1.5.1",
|
||||
"@remix-run/eslint-config": "1.5.1",
|
||||
"@remix-run/dev": "1.14.3",
|
||||
"@remix-run/eslint-config": "1.14.3",
|
||||
"@testing-library/cypress": "8.0.2",
|
||||
"@testing-library/dom": "8.13.0",
|
||||
"@testing-library/jest-dom": "5.16.4",
|
||||
|
@ -1,6 +1,6 @@
|
||||
import type { Request, Response } from "express";
|
||||
import type { ActionFunction, DataFunctionArgs, LoaderFunction, ServerBuild } from "@remix-run/node";
|
||||
import { isResponse } from "@remix-run/server-runtime/responses";
|
||||
import { isResponse } from "@remix-run/server-runtime/dist/responses";
|
||||
import type { Transaction } from "@sentry/types";
|
||||
import * as Sentry from "@sentry/node";
|
||||
import { v4 as uuid } from "uuid";
|
||||
@ -24,7 +24,7 @@ function wrapDataFunc(func: ActionFunction | LoaderFunction, routeId: string, me
|
||||
Sentry.configureScope((scope) => scope.setUser(null));
|
||||
}
|
||||
|
||||
const parentTransaction: Transaction | undefined = args.context && args.context.__sentry_transaction;
|
||||
const parentTransaction: Transaction | undefined = args.context && (args.context.__sentry_transaction as any);
|
||||
const transaction = parentTransaction?.startChild({
|
||||
op: `${method}:${routeId}`,
|
||||
description: `${method}: ${routeId}`,
|
||||
|
Loading…
Reference in New Issue
Block a user