diff --git a/dataloader/app/loaders/userLoader.ts b/dataloader/app/loaders/userLoader.ts index 4342f7a4..b9388a8c 100644 --- a/dataloader/app/loaders/userLoader.ts +++ b/dataloader/app/loaders/userLoader.ts @@ -1,4 +1,4 @@ -import { DataFunctionArgs } from "@remix-run/node"; +import type { DataFunctionArgs } from "@remix-run/node"; import DataLoader from "dataloader"; import { db } from "~/data.server"; diff --git a/dataloader/app/routes/users.tsx b/dataloader/app/routes/users.tsx index bef3b7ef..4cd7f39e 100644 --- a/dataloader/app/routes/users.tsx +++ b/dataloader/app/routes/users.tsx @@ -1,7 +1,8 @@ import { json } from "@remix-run/node"; import { Outlet, useLoaderData } from "@remix-run/react"; -import { User } from "~/data.server"; -import { DataLoaderArgs } from "~/loaders/userLoader"; + +import type { User } from "~/data.server"; +import type { DataLoaderArgs } from "~/loaders/userLoader"; export const loader = async ({ context }: DataLoaderArgs) => { const users = await context.loaders.usersById.loadMany([ diff --git a/dataloader/app/routes/users/index.tsx b/dataloader/app/routes/users/index.tsx index e44b7da5..2cda57ea 100644 --- a/dataloader/app/routes/users/index.tsx +++ b/dataloader/app/routes/users/index.tsx @@ -1,6 +1,7 @@ import { json } from "@remix-run/node"; import { useLoaderData } from "@remix-run/react"; -import { DataLoaderArgs } from "~/loaders/userLoader"; + +import type { DataLoaderArgs } from "~/loaders/userLoader"; export const loader = async ({ context }: DataLoaderArgs) => { /* diff --git a/file-and-cloudinary-upload/app/utils/utils.server.ts b/file-and-cloudinary-upload/app/utils/utils.server.ts index 4cc1714e..55f8be83 100644 --- a/file-and-cloudinary-upload/app/utils/utils.server.ts +++ b/file-and-cloudinary-upload/app/utils/utils.server.ts @@ -1,4 +1,5 @@ -import cloudinary, { UploadApiResponse } from "cloudinary"; +import type { UploadApiResponse } from "cloudinary"; +import cloudinary from "cloudinary"; import { writeAsyncIterableToWritable } from "@remix-run/node"; cloudinary.v2.config({ diff --git a/pm-app/app/routes/register.tsx b/pm-app/app/routes/register.tsx index 09b10221..c8c8e3b2 100644 --- a/pm-app/app/routes/register.tsx +++ b/pm-app/app/routes/register.tsx @@ -126,13 +126,13 @@ export const action = async ({ request }: ActionArgs) => { export default function Register() { const actionData = useActionData(); - let fieldErrors = + const fieldErrors = actionData && "fieldErrors" in actionData ? actionData.fieldErrors : undefined; - let formError = + const formError = actionData && "formError" in actionData ? actionData.formError : undefined; - let fields = + const fields = actionData && "fields" in actionData ? actionData.fields : undefined; const [searchParams] = useSearchParams();