Zomars/fixes trpc typo (#957)
parent
2ce2bb1ca8
commit
c2c37b701e
|
@ -7,6 +7,6 @@ module.exports = {
|
||||||
semi: true,
|
semi: true,
|
||||||
printWidth: 110,
|
printWidth: 110,
|
||||||
arrowParens: "always",
|
arrowParens: "always",
|
||||||
importOrder: ["^@ee/(.*)$", "^@lib/(.*)$", "^@components/(.*)$", "^@(server|trcp)/(.*)$", "^[./]"],
|
importOrder: ["^@ee/(.*)$", "^@lib/(.*)$", "^@components/(.*)$", "^@(server|trpc)/(.*)$", "^[./]"],
|
||||||
importOrderSeparation: true,
|
importOrderSeparation: true,
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
import * as AvatarPrimitive from "@radix-ui/react-avatar";
|
import * as AvatarPrimitive from "@radix-ui/react-avatar";
|
||||||
import * as Tooltip from "@radix-ui/react-tooltip";
|
import * as Tooltip from "@radix-ui/react-tooltip";
|
||||||
import { Maybe } from "@trpc/server";
|
|
||||||
|
|
||||||
import classNames from "@lib/classNames";
|
import classNames from "@lib/classNames";
|
||||||
import { defaultAvatarSrc } from "@lib/profile";
|
import { defaultAvatarSrc } from "@lib/profile";
|
||||||
|
|
||||||
|
import { Maybe } from "@trpc/server";
|
||||||
|
|
||||||
export type AvatarProps = {
|
export type AvatarProps = {
|
||||||
className?: string;
|
className?: string;
|
||||||
size?: number;
|
size?: number;
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
import { loadStripe, Stripe } from "@stripe/stripe-js";
|
import { loadStripe, Stripe } from "@stripe/stripe-js";
|
||||||
import { Maybe } from "@trpc/server";
|
|
||||||
import { stringify } from "querystring";
|
import { stringify } from "querystring";
|
||||||
|
|
||||||
|
import { Maybe } from "@trpc/server";
|
||||||
|
|
||||||
const stripePublicKey = process.env.NEXT_PUBLIC_STRIPE_PUBLIC_KEY!;
|
const stripePublicKey = process.env.NEXT_PUBLIC_STRIPE_PUBLIC_KEY!;
|
||||||
let stripePromise: Promise<Stripe | null>;
|
let stripePromise: Promise<Stripe | null>;
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
import { Maybe } from "@trpc/server";
|
|
||||||
import parser from "accept-language-parser";
|
import parser from "accept-language-parser";
|
||||||
import { IncomingMessage } from "http";
|
import { IncomingMessage } from "http";
|
||||||
|
|
||||||
import { getSession } from "@lib/auth";
|
import { getSession } from "@lib/auth";
|
||||||
import prisma from "@lib/prisma";
|
import prisma from "@lib/prisma";
|
||||||
|
|
||||||
|
import { Maybe } from "@trpc/server";
|
||||||
|
|
||||||
import { i18n } from "../../../next-i18next.config";
|
import { i18n } from "../../../next-i18next.config";
|
||||||
|
|
||||||
export function getLocaleFromHeaders(req: IncomingMessage): string {
|
export function getLocaleFromHeaders(req: IncomingMessage): string {
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import { Maybe } from "@trpc/server";
|
|
||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
|
|
||||||
|
import { Maybe } from "@trpc/server";
|
||||||
|
|
||||||
// makes sure the ui doesn't flash
|
// makes sure the ui doesn't flash
|
||||||
export default function useTheme(theme?: Maybe<string>) {
|
export default function useTheme(theme?: Maybe<string>) {
|
||||||
const [isReady, setIsReady] = useState(false);
|
const [isReady, setIsReady] = useState(false);
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
// ℹ️ Type-only import:
|
// ℹ️ Type-only import:
|
||||||
// https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-8.html#type-only-imports-and-export
|
// https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-8.html#type-only-imports-and-export
|
||||||
import { createReactQueryHooks } from "@trpc/react";
|
|
||||||
import type { inferProcedureOutput, inferProcedureInput } from "@trpc/server";
|
|
||||||
import superjson from "superjson";
|
import superjson from "superjson";
|
||||||
|
|
||||||
import type { AppRouter } from "@server/routers/_app";
|
import type { AppRouter } from "@server/routers/_app";
|
||||||
|
import { createReactQueryHooks } from "@trpc/react";
|
||||||
|
import type { inferProcedureOutput, inferProcedureInput } from "@trpc/server";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A set of strongly-typed React hooks from your `AppRouter` type signature with `createReactQueryHooks`.
|
* A set of strongly-typed React hooks from your `AppRouter` type signature with `createReactQueryHooks`.
|
||||||
|
|
|
@ -1,8 +1,3 @@
|
||||||
import { httpBatchLink } from "@trpc/client/links/httpBatchLink";
|
|
||||||
import { loggerLink } from "@trpc/client/links/loggerLink";
|
|
||||||
import { withTRPC } from "@trpc/next";
|
|
||||||
import type { TRPCClientErrorLike } from "@trpc/react";
|
|
||||||
import { Maybe } from "@trpc/server";
|
|
||||||
import { DefaultSeo } from "next-seo";
|
import { DefaultSeo } from "next-seo";
|
||||||
import type { AppProps as NextAppProps } from "next/app";
|
import type { AppProps as NextAppProps } from "next/app";
|
||||||
import superjson from "superjson";
|
import superjson from "superjson";
|
||||||
|
@ -13,6 +8,11 @@ import { seoConfig } from "@lib/config/next-seo.config";
|
||||||
import I18nLanguageHandler from "@components/I18nLanguageHandler";
|
import I18nLanguageHandler from "@components/I18nLanguageHandler";
|
||||||
|
|
||||||
import type { AppRouter } from "@server/routers/_app";
|
import type { AppRouter } from "@server/routers/_app";
|
||||||
|
import { httpBatchLink } from "@trpc/client/links/httpBatchLink";
|
||||||
|
import { loggerLink } from "@trpc/client/links/loggerLink";
|
||||||
|
import { withTRPC } from "@trpc/next";
|
||||||
|
import type { TRPCClientErrorLike } from "@trpc/react";
|
||||||
|
import { Maybe } from "@trpc/server";
|
||||||
|
|
||||||
import "../styles/globals.css";
|
import "../styles/globals.css";
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,9 @@
|
||||||
/**
|
/**
|
||||||
* This file contains tRPC's HTTP response handler
|
* This file contains tRPC's HTTP response handler
|
||||||
*/
|
*/
|
||||||
import * as trpcNext from "@trpc/server/adapters/next";
|
|
||||||
|
|
||||||
import { createContext } from "@server/createContext";
|
import { createContext } from "@server/createContext";
|
||||||
import { appRouter } from "@server/routers/_app";
|
import { appRouter } from "@server/routers/_app";
|
||||||
|
import * as trpcNext from "@trpc/server/adapters/next";
|
||||||
|
|
||||||
export default trpcNext.createNextApiHandler({
|
export default trpcNext.createNextApiHandler({
|
||||||
router: appRouter,
|
router: appRouter,
|
||||||
|
|
|
@ -1,7 +1,4 @@
|
||||||
/* eslint-disable @typescript-eslint/no-unused-vars */
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
||||||
import * as trpc from "@trpc/server";
|
|
||||||
import { Maybe } from "@trpc/server";
|
|
||||||
import * as trpcNext from "@trpc/server/adapters/next";
|
|
||||||
import { NextApiRequest } from "next";
|
import { NextApiRequest } from "next";
|
||||||
import { serverSideTranslations } from "next-i18next/serverSideTranslations";
|
import { serverSideTranslations } from "next-i18next/serverSideTranslations";
|
||||||
|
|
||||||
|
@ -10,6 +7,10 @@ import { getLocaleFromHeaders } from "@lib/core/i18n/i18n.utils";
|
||||||
import prisma from "@lib/prisma";
|
import prisma from "@lib/prisma";
|
||||||
import { defaultAvatarSrc } from "@lib/profile";
|
import { defaultAvatarSrc } from "@lib/profile";
|
||||||
|
|
||||||
|
import * as trpc from "@trpc/server";
|
||||||
|
import { Maybe } from "@trpc/server";
|
||||||
|
import * as trpcNext from "@trpc/server/adapters/next";
|
||||||
|
|
||||||
async function getUserFromSession({ session, req }: { session: Maybe<Session>; req: NextApiRequest }) {
|
async function getUserFromSession({ session, req }: { session: Maybe<Session>; req: NextApiRequest }) {
|
||||||
if (!session?.user?.id) {
|
if (!session?.user?.id) {
|
||||||
return null;
|
return null;
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
import { BookingStatus, Prisma } from "@prisma/client";
|
import { BookingStatus, Prisma } from "@prisma/client";
|
||||||
import { TRPCError } from "@trpc/server";
|
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import { getErrorFromUnknown } from "pages/_error";
|
import { getErrorFromUnknown } from "pages/_error";
|
||||||
import { z } from "zod";
|
import { z } from "zod";
|
||||||
|
@ -10,6 +9,8 @@ import { checkRegularUsername } from "@lib/core/checkRegularUsername";
|
||||||
import { ALL_INTEGRATIONS } from "@lib/integrations/getIntegrations";
|
import { ALL_INTEGRATIONS } from "@lib/integrations/getIntegrations";
|
||||||
import slugify from "@lib/slugify";
|
import slugify from "@lib/slugify";
|
||||||
|
|
||||||
|
import { TRPCError } from "@trpc/server";
|
||||||
|
|
||||||
import { getCalendarAdapterOrNull } from "../../lib/calendarClient";
|
import { getCalendarAdapterOrNull } from "../../lib/calendarClient";
|
||||||
import { createProtectedRouter, createRouter } from "../createRouter";
|
import { createProtectedRouter, createRouter } from "../createRouter";
|
||||||
import { resizeBase64Image } from "../lib/resizeBase64Image";
|
import { resizeBase64Image } from "../lib/resizeBase64Image";
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { createSSGHelpers } from "@trpc/react/ssg";
|
|
||||||
|
|
||||||
import prisma from "@lib/prisma";
|
import prisma from "@lib/prisma";
|
||||||
|
|
||||||
|
import { createSSGHelpers } from "@trpc/react/ssg";
|
||||||
|
|
||||||
import { appRouter } from "./routers/_app";
|
import { appRouter } from "./routers/_app";
|
||||||
|
|
||||||
export const ssg = createSSGHelpers({
|
export const ssg = createSSGHelpers({
|
||||||
|
|
Loading…
Reference in New Issue