Skip to content

Commit

Permalink
setup cloudflare pages #96
Browse files Browse the repository at this point in the history
  • Loading branch information
djobbo committed Oct 23, 2023
1 parent 0e230e1 commit a9b9198
Show file tree
Hide file tree
Showing 10 changed files with 1,787 additions and 103 deletions.
1 change: 0 additions & 1 deletion app/app/[locale]/(stats)/error.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ export default function Error({
const { _ } = useLingui()
useEffect(() => {
// TODO: Log the error to an error reporting service
console.error(error)
}, [error])

return <ErrorDisplay reset={reset} title={_(msg`Failed to fetch stats`)} />
Expand Down
2 changes: 1 addition & 1 deletion app/app/[locale]/_layout/SideNav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { cleanString } from "common/helpers/cleanString"
import { cn } from "@/lib/utils"
import { css } from "ui/theme"
import { legendsMap } from "bhapi/legends"
import { msg, t } from "@lingui/macro"
import { msg } from "@lingui/macro"
import { useFavorites } from "@/providers/auth/AuthProvider"
import { useLingui } from "@lingui/react"
import { useParams, usePathname } from "next/navigation"
Expand Down
2 changes: 2 additions & 0 deletions app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"dev": "next dev",
"dev:prod": "NEXT_PUBLIC_FORCE_PRODUCTION_WEBSITE=true next dev",
"build": "next build",
"build:prod": "next-on-pages",
"start": "next start",
"db:gen": "drizzle-kit generate:pg",
"db:studio": "drizzle-kit studio",
Expand Down Expand Up @@ -58,6 +59,7 @@
"zustand": "^4.4.4"
},
"devDependencies": {
"@cloudflare/next-on-pages": "^1.7.2",
"@lingui/cli": "^4.5.0",
"@lingui/conf": "^4.5.0",
"@lingui/loader": "^4.5.0",
Expand Down
5 changes: 1 addition & 4 deletions app/server/router/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import { router } from "../trpc"
import { usersRouter } from "./users"

export const appRouter = router({
users: usersRouter,
})
export const appRouter = router({})

export type AppRouter = typeof appRouter
14 changes: 0 additions & 14 deletions app/server/router/users/getSingleUser.ts

This file was deleted.

6 changes: 0 additions & 6 deletions app/server/router/users/index.ts

This file was deleted.

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"repository": "https://github.com/djobbo/corehalla.git",
"author": "Djobbo Maïga <hi@djobbo.com>",
"scripts": {
"build": "turbo run build",
"lint": "eslint --fix --ext .js,.jsx,.ts,.tsx .",
"format": "prettier --write \"**/*.{ts,tsx,md}\" && turbo run format",
"ts:check": "turbo run ts:check",
Expand All @@ -14,7 +13,7 @@
"dl-roster": "turbo run dl-roster",
"db:migrate": "turbo run db:migrate",
"db:migrate:prod": "turbo run db:migrate:prod --scope=db --include-dependencies --no-deps",
"build:prod": "pnpm db:migrate:prod && turbo run build --scope=app --include-dependencies --no-deps",
"build:prod": "pnpm db:migrate:prod && turbo run build:prod --scope=app --include-dependencies --no-deps",
"dev": "turbo run dev --parallel",
"setup:env": "zx setup.zx.mjs",
"deadcode": "knip --no-gitignore --reporter compact"
Expand Down
4 changes: 2 additions & 2 deletions packages/db/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
"format": "prisma format",
"db:studio": "prisma studio",
"ts:check": "tsc --noEmit",
"build": "prisma generate",
"postinstall": "pnpm build",
"build:prod": "prisma generate",
"postinstall": "pnpm build:prod",
"prisma": "prisma"
},
"devDependencies": {
Expand Down
Loading

0 comments on commit a9b9198

Please sign in to comment.