mirror of
https://github.com/Xevion/100prisoners.git
synced 2025-12-05 23:14:15 -06:00
Switch from relative imports to absolute imports
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import {classNames, range} from "../utils/helpers";
|
||||
import BoxGraphic from "./BoxGraphic";
|
||||
import {classNames, range} from "@/utils/helpers";
|
||||
import BoxGraphic from "@/components/BoxGraphic";
|
||||
import Xarrow from "react-xarrows";
|
||||
|
||||
import Chance from "chance";
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { type AppType } from "next/app";
|
||||
|
||||
import { trpc } from "../utils/trpc";
|
||||
import { trpc } from "@/utils/trpc";
|
||||
|
||||
import "../styles/globals.scss";
|
||||
import "@/styles/globals.scss";
|
||||
|
||||
const MyApp: AppType = ({ Component, pageProps }) => {
|
||||
return <Component {...pageProps} />;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { createNextApiHandler } from "@trpc/server/adapters/next";
|
||||
|
||||
import { env } from "../../../env/server.mjs";
|
||||
import { createContext } from "../../../server/trpc/context";
|
||||
import { appRouter } from "../../../server/trpc/router/_app";
|
||||
import { env } from "@/env/server.mjs";
|
||||
import { createContext } from "@/server/trpc/context";
|
||||
import { appRouter } from "@/server/trpc/router/_app";
|
||||
|
||||
// export API handler
|
||||
export default createNextApiHandler({
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import {type NextPage} from "next";
|
||||
import Head from "next/head";
|
||||
import BoxTable from "../components/BoxTable";
|
||||
import BoxTable from "@/components/BoxTable";
|
||||
import NoSSR from "react-no-ssr";
|
||||
import Link from "next/link";
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { router } from "../trpc";
|
||||
import { exampleRouter } from "./example";
|
||||
import { router } from "@/server/trpc/trpc";
|
||||
import { exampleRouter } from "@/server/trpc/router/example";
|
||||
|
||||
export const appRouter = router({
|
||||
example: exampleRouter,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { z } from "zod";
|
||||
|
||||
import { router, publicProcedure } from "../trpc";
|
||||
import { router, publicProcedure } from "@/server/trpc/trpc";
|
||||
|
||||
export const exampleRouter = router({
|
||||
hello: publicProcedure
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { initTRPC } from "@trpc/server";
|
||||
import superjson from "superjson";
|
||||
|
||||
import { type Context } from "./context";
|
||||
import { type Context } from "@/server/trpc/context";
|
||||
|
||||
const t = initTRPC.context<Context>().create({
|
||||
transformer: superjson,
|
||||
|
||||
@@ -3,7 +3,7 @@ import { createTRPCNext } from "@trpc/next";
|
||||
import { type inferRouterInputs, type inferRouterOutputs } from "@trpc/server";
|
||||
import superjson from "superjson";
|
||||
|
||||
import { type AppRouter } from "../server/trpc/router/_app";
|
||||
import { type AppRouter } from "@/server/trpc/router/_app";
|
||||
|
||||
const getBaseUrl = () => {
|
||||
if (typeof window !== "undefined") return ""; // browser should use relative url
|
||||
|
||||
@@ -14,7 +14,11 @@
|
||||
"isolatedModules": true,
|
||||
"jsx": "preserve",
|
||||
"incremental": true,
|
||||
"noUncheckedIndexedAccess": true
|
||||
"noUncheckedIndexedAccess": true,
|
||||
"baseUrl": "./src",
|
||||
"paths": {
|
||||
"@/*": ["./*"]
|
||||
}
|
||||
},
|
||||
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", "**/*.cjs", "**/*.mjs"],
|
||||
"exclude": ["node_modules"]
|
||||
|
||||
Reference in New Issue
Block a user