- {{ error.statusCode }}
+ {{ error?.statusCode }}
- Sorry, {{ error.statusCode === 404
+ Sorry, {{ error?.statusCode === 404
? "the page you are looking for doesn't exist or as been moved."
: "you have encountered a problem."
}}
diff --git a/src/layouts/default.vue b/src/layouts/default.vue
index 02f9210..2060d94 100644
--- a/src/layouts/default.vue
+++ b/src/layouts/default.vue
@@ -4,17 +4,19 @@ const getColor = computed(() => appConfig.ui.primary)
-
-
-
-
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
diff --git a/src/plugins/trpc.ts b/src/plugins/trpc.ts
index b88bde5..6ace02f 100644
--- a/src/plugins/trpc.ts
+++ b/src/plugins/trpc.ts
@@ -1,3 +1,4 @@
+import process from 'node:process'
import { loggerLink } from '@trpc/client'
import SuperJSON from 'superjson'
import { createTRPCNuxtClient, httpBatchLink } from 'trpc-nuxt/client'
diff --git a/src/server/prisma.ts b/src/server/prisma.ts
index 442cb44..a83500b 100644
--- a/src/server/prisma.ts
+++ b/src/server/prisma.ts
@@ -1,3 +1,4 @@
+import process from 'node:process'
import { PrismaClient } from '@prisma/client/edge'
const globalForPrisma = globalThis as unknown as { prisma: PrismaClient }
diff --git a/src/server/trpc/context.ts b/src/server/trpc/context.ts
index 2c2e125..c0d29ec 100644
--- a/src/server/trpc/context.ts
+++ b/src/server/trpc/context.ts
@@ -1,6 +1,6 @@
import type { inferAsyncReturnType } from '@trpc/server'
import type { H3Event } from 'h3'
-import { prisma } from '~/server/prisma'
+import { prisma } from '../prisma'
export function createContext(_event: H3Event) {
return {
diff --git a/src/server/trpc/routers/announcement.ts b/src/server/trpc/routers/announcement.ts
index 038270d..473ace0 100644
--- a/src/server/trpc/routers/announcement.ts
+++ b/src/server/trpc/routers/announcement.ts
@@ -1,4 +1,4 @@
-import { publicProcedure, router } from '~/server/trpc/trpc'
+import { publicProcedure, router } from '../trpc'
export default router({
get: publicProcedure
diff --git a/src/server/trpc/routers/index.ts b/src/server/trpc/routers/index.ts
index aaf8a24..db340e9 100644
--- a/src/server/trpc/routers/index.ts
+++ b/src/server/trpc/routers/index.ts
@@ -1,8 +1,8 @@
-import announcement from '~/server/trpc/routers/announcement'
-import maintenance from '~/server/trpc/routers/maintenance'
-import talents from '~/server/trpc/routers/talents'
-import post from '~/server/trpc/routers/post'
-import { router } from '~/server/trpc/trpc'
+import { router } from '../trpc'
+import announcement from './announcement'
+import maintenance from './maintenance'
+import post from './post'
+import talents from './talents'
export const appRouter = router({
announcement,
diff --git a/src/server/trpc/routers/maintenance.ts b/src/server/trpc/routers/maintenance.ts
index 92538ea..c23eb45 100644
--- a/src/server/trpc/routers/maintenance.ts
+++ b/src/server/trpc/routers/maintenance.ts
@@ -1,4 +1,4 @@
-import { publicProcedure, router } from '~/server/trpc/trpc'
+import { publicProcedure, router } from '../trpc'
export default router({
get: publicProcedure
diff --git a/src/server/trpc/routers/post.ts b/src/server/trpc/routers/post.ts
index 7df79ef..e2a11c4 100644
--- a/src/server/trpc/routers/post.ts
+++ b/src/server/trpc/routers/post.ts
@@ -1,8 +1,8 @@
-import { object, string } from 'valibot'
-import { publicProcedure, router } from '~/server/trpc/trpc'
+import { z } from 'zod'
+import { publicProcedure, router } from '../trpc'
-const PostSchema = object({
- slug: string(),
+const PostSchema = z.object({
+ slug: z.string(),
})
export default router({
diff --git a/src/server/trpc/routers/talents.ts b/src/server/trpc/routers/talents.ts
index 1003267..1711f8e 100644
--- a/src/server/trpc/routers/talents.ts
+++ b/src/server/trpc/routers/talents.ts
@@ -1,11 +1,11 @@
-import { boolean, literal, object, string, union } from 'valibot'
-import { publicProcedure, router } from '~/server/trpc/trpc'
+import { z } from 'zod'
+import { publicProcedure, router } from '../trpc'
export default router({
getTalents: publicProcedure
- .input(object({
- favorite: boolean(),
- category: union([string(), literal('all')]),
+ .input(z.object({
+ favorite: z.boolean(),
+ category: z.union([z.string(), z.literal('all')]),
}))
.query(async ({ ctx, input }) => {
if (input.favorite) {
diff --git a/src/server/trpc/trpc.ts b/src/server/trpc/trpc.ts
index 4e820f4..dc4cdd9 100644
--- a/src/server/trpc/trpc.ts
+++ b/src/server/trpc/trpc.ts
@@ -1,6 +1,6 @@
import { initTRPC } from '@trpc/server'
import SuperJSON from 'superjson'
-import type { Context } from '~/server/trpc/context'
+import type { Context } from './context'
const trpc = initTRPC.context
().create({
transformer: SuperJSON,
diff --git a/tailwind.config.ts b/tailwind.config.ts
index fb753c4..ddd0e35 100644
--- a/tailwind.config.ts
+++ b/tailwind.config.ts
@@ -1,7 +1,7 @@
import type { Config } from 'tailwindcss'
import { ColorsTheme } from './types'
-export default >{
+export default {
safelist: [
// Theme text colors
...Object.values(ColorsTheme).map(color => `text-${color}-500`),
@@ -12,6 +12,11 @@ export default >{
...Object.values(ColorsTheme).map(color => `bg-${color}-500`),
...Object.values(ColorsTheme).map(color => `hover:bg-${color}-500`),
...'text-black dark:text-white'.split(' '),
+
+ // Theme border colors
+ ...Object.values(ColorsTheme).map(color => `border-${color}-500`),
+ ...Object.values(ColorsTheme).map(color => `hover:border-${color}-500`),
+ ...'border-black dark:border-white'.split(' '),
],
theme: {
extend: {
@@ -20,4 +25,4 @@ export default >{
},
},
},
-}
+} satisfies Partial