Converted to absolute imports

This commit is contained in:
2023-02-27 22:34:48 -06:00
parent c6af9dddb0
commit c67f71ca41
5 changed files with 7 additions and 7 deletions

View File

@@ -3,7 +3,7 @@ import { type Session } from "next-auth";
import { SessionProvider } from "next-auth/react";
import { SSRProvider } from "react-aria";
import Head from "next/head";
import { api } from "../utils/api";
import { api } from "@utils/api";
import "@styles/globals.css";
import Layout from "@components/Layout";

View File

@@ -1,4 +1,4 @@
import NextAuth from "next-auth";
import { authOptions } from "../../../server/auth";
import { authOptions } from "@server/auth";
export default NextAuth(authOptions);

View File

@@ -1,8 +1,8 @@
import { createNextApiHandler } from "@trpc/server/adapters/next";
import { env } from "../../../env.mjs";
import { createTRPCContext } from "../../../server/api/trpc";
import { appRouter } from "../../../server/api/root";
import { createTRPCContext } from "@server/api/trpc";
import { appRouter } from "@server/api/root";
// export API handler
export default createNextApiHandler({
@@ -12,7 +12,7 @@ export default createNextApiHandler({
env.NODE_ENV === "development"
? ({ path, error }) => {
console.error(
`❌ tRPC failed on ${path ?? "<no-path>"}: ${error.message}`,
`❌ tRPC failed on ${path ?? "<no-path>"}: ${error.message}`
);
}
: undefined,

View File

@@ -1,5 +1,5 @@
import { type NextPage } from "next";
import Button from "../components/Button";
import Button from "@components/Button";
const Home: NextPage = () => {
return (

View File

@@ -10,7 +10,7 @@ import { createTRPCNext } from "@trpc/next";
import { type inferRouterInputs, type inferRouterOutputs } from "@trpc/server";
import superjson from "superjson";
import { type AppRouter } from "../server/api/root";
import { type AppRouter } from "@server/api/root";
const getBaseUrl = () => {
if (typeof window !== "undefined") return ""; // browser should use relative url