diff --git a/apps/web/package.json b/apps/web/package.json index d928b143..8d8fb493 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -8,11 +8,12 @@ "dev": "next dev", "postinstall": "prisma generate", "lint": "next lint", + "typecheck": "tsc --noEmit", "start": "next start" }, "dependencies": { "@hookform/resolvers": "^3.3.2", - "@mixan/types": "^0.0.2-alpha", + "@mixan/types": "workspace:*", "@next-auth/prisma-adapter": "^1.0.7", "@prisma/client": "^5.1.1", "@radix-ui/react-alert-dialog": "^1.0.5", diff --git a/apps/web/src/components/ui/button.tsx b/apps/web/src/components/ui/button.tsx index 39932cc0..ad9de739 100644 --- a/apps/web/src/components/ui/button.tsx +++ b/apps/web/src/components/ui/button.tsx @@ -1,8 +1,8 @@ -import * as React from "react" -import { Slot } from "@radix-ui/react-slot" -import { cva, type VariantProps } from "class-variance-authority" +import * as React from "react"; +import { Slot } from "@radix-ui/react-slot"; +import { cva, type VariantProps } from "class-variance-authority"; -import { cn } from "@/utils/cn" +import { cn } from "@/utils/cn"; const buttonVariants = cva( "inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50", @@ -30,30 +30,31 @@ const buttonVariants = cva( variant: "default", size: "default", }, - } -) + }, +); -export interface ButtonProps +interface ButtonProps extends React.ButtonHTMLAttributes, VariantProps { - asChild?: boolean + asChild?: boolean; } const Button = React.forwardRef( ({ className, variant, size, asChild = false, ...props }, ref) => { - const Comp = asChild ? Slot : "button" + const Comp = asChild ? Slot : "button"; return ( + // @ts-expect-error - ) - } -) -Button.displayName = "Button" + ); + }, +); +Button.displayName = "Button"; Button.defaultProps = { - type: 'button' -} + type: "button", +}; -export { Button, buttonVariants } +export { Button, buttonVariants }; diff --git a/apps/web/src/pages/index.tsx b/apps/web/src/pages/index.tsx index 275eb8d2..ce489d11 100644 --- a/apps/web/src/pages/index.tsx +++ b/apps/web/src/pages/index.tsx @@ -8,7 +8,7 @@ export const getServerSideProps = createServerSideProps() export default function Home() { const router = useRouter() - const query = api.organization.current.useQuery(); + const query = api.organization.first.useQuery(); const organization = query.data ?? null; useEffect(() => { diff --git a/apps/web/src/server/auth.ts b/apps/web/src/server/auth.ts index 3324d23e..3d79b981 100644 --- a/apps/web/src/server/auth.ts +++ b/apps/web/src/server/auth.ts @@ -20,8 +20,6 @@ declare module "next-auth" { interface Session extends DefaultSession { user: DefaultSession["user"] & { id: string; - // ...other properties - // role: UserRole; }; } diff --git a/apps/web/src/utils/theme.ts b/apps/web/src/utils/theme.ts index 83907e18..348f7e73 100644 --- a/apps/web/src/utils/theme.ts +++ b/apps/web/src/utils/theme.ts @@ -1,5 +1,6 @@ import resolveConfig from "tailwindcss/resolveConfig"; import tailwinConfig from "../../tailwind.config"; +// @ts-expect-error const config = resolveConfig(tailwinConfig); export const theme = config.theme as any; diff --git a/bun.lockb b/bun.lockb index 104b8443..4a11c745 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/packages/types/index.ts b/packages/types/index.ts index 3aa2ab48..37357e5d 100644 --- a/packages/types/index.ts +++ b/packages/types/index.ts @@ -30,29 +30,32 @@ export type ProfileDecrementPayload = { // Batching export type BatchEvent = { - type: 'event', + type: 'event' payload: EventPayload } export type BatchProfile = { - type: 'profile', + type: 'profile' payload: ProfilePayload } export type BatchProfileIncrement = { - type: 'profile_increment', + type: 'profile_increment' payload: ProfileIncrementPayload } export type BatchProfileDecrement = { - type: 'profile_decrement', + type: 'profile_decrement' payload: ProfileDecrementPayload } -export type BatchItem = BatchEvent | BatchProfile | BatchProfileIncrement | BatchProfileDecrement +export type BatchItem = + | BatchEvent + | BatchProfile + | BatchProfileIncrement + | BatchProfileDecrement export type BatchPayload = Array - export type MixanIssue = { field: string message: string @@ -63,11 +66,11 @@ export type MixanErrorResponse = { status: 'error' code: number message: string - issues?: Array - stack?: string + issues?: Array | undefined + stack?: string | undefined } export type MixanResponse = { result: T status: 'ok' -} \ No newline at end of file +}