feat: enhance tickets portal and admin flows

This commit is contained in:
Esdras Renan 2025-10-07 02:26:09 -03:00
parent 9cdd8763b4
commit c15f0a5b09
67 changed files with 1101 additions and 338 deletions

View file

@ -3,9 +3,9 @@
import { createContext, useContext, useEffect, useMemo, useState } from "react"
import { customSessionClient } from "better-auth/client/plugins"
import { createAuthClient } from "better-auth/react"
import type { AppAuth } from "@/lib/auth"
import { useMutation } from "convex/react"
// @ts-expect-error Convex generates runtime API without types until build
import { api } from "@/convex/_generated/api"
import { DEFAULT_TENANT_ID } from "@/lib/constants"
import { isAdmin, isCustomer, isStaff } from "@/lib/authz"
@ -26,7 +26,7 @@ export type AppSession = {
}
const authClient = createAuthClient({
plugins: [customSessionClient<AppSession>()],
plugins: [customSessionClient<AppAuth>()],
fetchOptions: {
credentials: "include",
},