Fix build issues

This commit is contained in:
Fergal Moran
2024-01-31 19:49:10 +00:00
parent 5f6222ed6b
commit 168f2aa257
16 changed files with 25 additions and 30 deletions

View File

@@ -1,7 +1,7 @@
"use client";
import UpdateNameCard from "./UpdateNameCard";
import UpdateEmailCard from "./UpdateEmailCard";
import { AuthSession } from "@/lib/auth/utils";
import { type AuthSession } from "@/lib/auth/utils";
export default function UserSettings({
session,

View File

@@ -1,4 +1,4 @@
import { DefaultSession } from "next-auth";
import { type DefaultSession } from "next-auth";
import NextAuth from "next-auth/next";
import { authOptions } from "@/lib/auth/utils";

View File

@@ -3,7 +3,7 @@ import Link from "next/link";
import SidebarItems from "./SidebarItems";
import { Avatar, AvatarFallback } from "./ui/avatar";
import { AuthSession, getUserAuth } from "@/lib/auth/utils";
import { type AuthSession, getUserAuth } from "@/lib/auth/utils";
const Sidebar = async () => {
const session = await getUserAuth();

View File

@@ -3,7 +3,7 @@
import Link from "next/link";
import { usePathname } from "next/navigation";
import { LucideIcon } from "lucide-react";
import { type LucideIcon } from "lucide-react";
import { cn } from "@/lib/utils";
import { defaultLinks, additionalLinks } from "@/config/nav";

View File

@@ -1,6 +1,6 @@
"use client";
import { Device, NewDeviceParams, insertDeviceParams } from "@/server/db/schema/devices";
import { type Device, type NewDeviceParams, insertDeviceParams } from "@/server/db/schema/devices";
import { useForm } from "react-hook-form";
import { zodResolver } from "@hookform/resolvers/zod";
@@ -15,7 +15,7 @@ import {
import { Input } from "@/components/ui/input";
import { api as trpc } from "@/trpc/react";
import { Button } from "@/components/ui/button";
import { z } from "zod";
import { type z } from "zod";
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select";
import { useRouter } from "next/navigation";
import { useToast } from "@/components/ui/use-toast";

View File

@@ -1,5 +1,5 @@
"use client";
import { CompleteDevice } from "@/server/db/schema/devices";
import { type CompleteDevice } from "@/server/db/schema/devices";
import { api as trpc } from "@/trpc/react";
import DeviceModal from "./DeviceModal";

View File

@@ -10,7 +10,7 @@ import {
DialogTrigger,
} from "../ui/dialog";
import DeviceForm from "./DeviceForm";
import { Device } from "@/server/db/schema/devices";
import { type Device } from "@/server/db/schema/devices";
export default function DeviceModal({
device,

View File

@@ -3,9 +3,9 @@ import "leaflet/dist/leaflet.css";
import React from "react";
import { MapContainer, TileLayer } from "react-leaflet";
import MapMarker from "@/components/maps/map-marker";
import { Child, type CompleteChild } from "@/server/db/schema/children";
import { Ping } from "@/server/db/schema/pings";
import { Device } from "@/server/db/schema/devices";
import { type Child, type CompleteChild } from "@/server/db/schema/children";
import { type Ping } from "@/server/db/schema/pings";
import { type Device } from "@/server/db/schema/devices";
import { getLatestPing } from "@/lib/helpers/location/ping";
type MainMapProps = {

View File

@@ -3,7 +3,7 @@ import React from "react";
import dynamic from "next/dynamic";
import ChildrenFilter from "../children/children-filter";
import { MapViewTypeSelector } from "../maps/map-viewtype-selector";
import { CompleteChild } from "@/server/db/schema/children";
import { type CompleteChild } from "@/server/db/schema/children";
type DashboardPageProps = {
children: CompleteChild[];

View File

@@ -1,11 +1,11 @@
import * as React from "react"
import * as LabelPrimitive from "@radix-ui/react-label"
import type * as LabelPrimitive from "@radix-ui/react-label"
import { Slot } from "@radix-ui/react-slot"
import {
Controller,
ControllerProps,
FieldPath,
FieldValues,
type ControllerProps,
type FieldPath,
type FieldValues,
FormProvider,
useFormContext,
} from "react-hook-form"

View File

@@ -2,7 +2,7 @@ import * as React from "react"
import { ChevronLeft, ChevronRight, MoreHorizontal } from "lucide-react"
import { cn } from "@/lib/utils"
import { ButtonProps, buttonVariants } from "@/components/ui/button"
import { type ButtonProps, buttonVariants } from "@/components/ui/button"
const Pagination = ({ className, ...props }: React.ComponentProps<"nav">) => (
<nav

View File

@@ -2,7 +2,7 @@
import * as React from "react"
import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group"
import { VariantProps } from "class-variance-authority"
import { type VariantProps } from "class-variance-authority"
import { cn } from "@/lib/utils"
import { toggleVariants } from "@/components/ui/toggle"

View File

@@ -1,4 +1,4 @@
import { SidebarLink } from "@/components/SidebarItems";
import { type SidebarLink } from "@/components/SidebarItems";
import { Cog, Globe, HomeIcon } from "lucide-react";
type AdditionalLinks = {

View File

@@ -1,9 +1,9 @@
import { db } from "@/server/db/index";
import { DrizzleAdapter } from "@auth/drizzle-adapter";
import { DefaultSession, getServerSession, NextAuthOptions } from "next-auth";
import { type DefaultSession, getServerSession, type NextAuthOptions } from "next-auth";
import { redirect } from "next/navigation";
import GoogleProvider from "next-auth/providers/google";
import { Adapter } from "next-auth/adapters";
import { type Adapter } from "next-auth/adapters";
import { env } from "@/env";
declare module "next-auth" {

View File

@@ -1,7 +1,7 @@
"use client";
import { FormEvent, useState } from "react";
import { ZodSchema } from "zod";
import { type FormEvent, useState } from "react";
import { type ZodSchema } from "zod";
type EntityZodErrors<T> = Partial<Record<keyof T, string[] | undefined>>;
@@ -12,7 +12,7 @@ export function useValidatedForm<Entity>(insertEntityZodSchema: ZodSchema) {
Object.values(errors).some((error) => error !== undefined);
const handleChange = (event: FormEvent<HTMLFormElement>) => {
const target = event.target as EventTarget;
const target = event.target;
if (
target instanceof HTMLInputElement ||
target instanceof HTMLSelectElement ||

View File

@@ -1,9 +1,4 @@
import {
varchar,
pgTable,
PgColumn,
PgTableWithColumns,
} from "drizzle-orm/pg-core";
import { varchar, pgTable } from "drizzle-orm/pg-core";
import { createInsertSchema, createSelectSchema } from "drizzle-zod";
import { z } from "zod";
import { children } from "./children";