Skip to content

Commit

Permalink
fixing build errors
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonBoyett committed Feb 16, 2024
1 parent 87c8bd5 commit 89698ab
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 29 deletions.
13 changes: 6 additions & 7 deletions apps/nextjs/next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,27 +1,26 @@
// @ts-check
/**
* Run `build` or `dev` with `SKIP_ENV_VALIDATION` to skip env validation.
* This is especially useful for Docker builds.
*/
!process.env.SKIP_ENV_VALIDATION && (await import("./src/env/server.mjs"));
!process.env.SKIP_ENV_VALIDATION && (await import('./src/env/server.mjs'))

import { PrismaPlugin } from "@prisma/nextjs-monorepo-workaround-plugin";
import { PrismaPlugin } from '@prisma/nextjs-monorepo-workaround-plugin'

/** @type {import("next").NextConfig} */
const config = {
webpack: (config, { isServer }) => {
if (isServer) {
config.plugins = [...config.plugins, new PrismaPlugin()]
}
return config
return config
},
reactStrictMode: true,
swcMinify: true,
transpilePackages: ["@acme/api", "@acme/db"],
transpilePackages: ['@acme/api', '@acme/db'],
// We already do linting on GH actions
eslint: {
ignoreDuringBuilds: !!process.env.CI,
},
};
}

export default config;
export default config
3 changes: 2 additions & 1 deletion apps/nextjs/src/pages/admin/index.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { useEffect, useState } from 'react'
import { trpc } from '../../utils/trpc'
import { useRouter } from 'next/router'
import { SingletonRouter, useRouter } from 'next/router'
import Sidebar from '../../components/sidebar'
import { useClerk } from '@clerk/nextjs'
import { navigate } from '@acme/helpers'

export default function Page() {
const router = useRouter()
Expand Down
6 changes: 3 additions & 3 deletions apps/nextjs/src/stores/useMutateUser.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import useUserStore from './userStore'
import { useEffect, useState } from 'react'
import { api } from '~/utils/api'
import type { User } from '~/utils/types'
import { trpc } from '../utils/trpc'
import type { User } from '@acme/types'

const useMutateUser = () => {
const store = useUserStore()
const [user, setUser] = useState<User | null>()
const { mutate } = api.user.setUser.useMutation()
const { mutate } = trpc.user.set.useMutation()
useEffect(() => {
if (!user) return
mutate(user)
Expand Down
2 changes: 0 additions & 2 deletions packages/api/src/router/index.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
import { router } from '../trpc'
import { postRouter } from './post'
import { authRouter } from './auth'
import { userRouter } from './user'
import { collectionRouter } from './collection'
import { excercisePropsRouter } from './exercises'
import { buildSpeedTestRouter } from './builders'

export const appRouter = router({
post: postRouter,
auth: authRouter,
user: userRouter,
excercise: excercisePropsRouter,
Expand Down
16 changes: 0 additions & 16 deletions packages/api/src/router/post.ts

This file was deleted.

0 comments on commit 89698ab

Please sign in to comment.