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