From 1c69dd77a1402ce151f941c77af8684cdb6bcf56 Mon Sep 17 00:00:00 2001 From: Don Starwsburg Date: Tue, 26 Nov 2024 00:14:49 -0500 Subject: [PATCH] more fixes --- src/components/Brand/BrandsList.tsx | 2 +- src/components/Brand/brand.tsx | 2 +- src/components/FeaturesSection/index.tsx | 2 -- src/components/Header/index.tsx | 1 - src/components/HomeContent/index.tsx | 1 - src/components/Navbar/index.tsx | 7 ++++--- src/components/site/About/index.tsx | 7 +++---- src/components/site/Footer /index.tsx | 2 -- src/components/ui/button.tsx | 2 +- src/db/index.ts | 2 -- src/lib/client.ts | 5 ----- tsconfig.json | 2 ++ 12 files changed, 12 insertions(+), 23 deletions(-) delete mode 100644 src/lib/client.ts diff --git a/src/components/Brand/BrandsList.tsx b/src/components/Brand/BrandsList.tsx index 5aea045..1977c20 100644 --- a/src/components/Brand/BrandsList.tsx +++ b/src/components/Brand/BrandsList.tsx @@ -1,6 +1,6 @@ "use client"; import { FC, useState } from "react"; -import { brandType } from "../../types/brandType"; +import { brandType } from "src/types/brandType"; import Brand from "./brand"; import AddBrand from "./addBrand"; import { addBrand, deleteBrand, editBrand } from "../../actions/brandActions"; diff --git a/src/components/Brand/brand.tsx b/src/components/Brand/brand.tsx index 49f0e25..53769ca 100644 --- a/src/components/Brand/brand.tsx +++ b/src/components/Brand/brand.tsx @@ -1,6 +1,6 @@ "use client"; import { ChangeEvent, FC, useState } from "react"; -import { brandType } from "../../types/brandType"; +import { brandType } from "src/types/brandType"; interface Props { brand: brandType; changeBrandName: (id: number, name: string) => void; diff --git a/src/components/FeaturesSection/index.tsx b/src/components/FeaturesSection/index.tsx index 9103e4e..7d9da37 100644 --- a/src/components/FeaturesSection/index.tsx +++ b/src/components/FeaturesSection/index.tsx @@ -1,5 +1,3 @@ -import Link from "next/link"; - export default function FeaturesSection() { return ( diff --git a/src/components/Header/index.tsx b/src/components/Header/index.tsx index 6219d1e..3e6c405 100644 --- a/src/components/Header/index.tsx +++ b/src/components/Header/index.tsx @@ -1,5 +1,4 @@ import { Box, Flex, Link, Heading } from "@chakra-ui/react"; -import NextLink from "next/link"; const Header: React.FC = () => { return ( diff --git a/src/components/HomeContent/index.tsx b/src/components/HomeContent/index.tsx index 82f78b7..b38a21d 100644 --- a/src/components/HomeContent/index.tsx +++ b/src/components/HomeContent/index.tsx @@ -1,4 +1,3 @@ -import Link from "next/link"; import Header from "../Header"; import Hero from "../Hero"; import FeaturesSection from "../FeaturesSection"; diff --git a/src/components/Navbar/index.tsx b/src/components/Navbar/index.tsx index bd837f4..94f1241 100644 --- a/src/components/Navbar/index.tsx +++ b/src/components/Navbar/index.tsx @@ -8,6 +8,7 @@ import { MenuItems, } from "@headlessui/react"; import { Bars3Icon, BellIcon, XMarkIcon } from "@heroicons/react/24/outline"; +import Image from "next/image"; const navigation = [ { name: "Home", href: "/", current: true }, @@ -17,7 +18,7 @@ const navigation = [ { name: "Brands", href: "/Brands", current: false }, ]; -function classNames(...classes) { +function classNames(...classes: unknown[]) { return classes.filter(Boolean).join(" "); } @@ -43,7 +44,7 @@ export default function Example() {
- Ballistic Builder Open user menu - - + + {/* */}
) diff --git a/src/components/site/Footer /index.tsx b/src/components/site/Footer /index.tsx index 2c85855..c64d7cb 100644 --- a/src/components/site/Footer /index.tsx +++ b/src/components/site/Footer /index.tsx @@ -1,5 +1,3 @@ -import Link from "next/link"; - export default function Footer() { return ( diff --git a/src/components/ui/button.tsx b/src/components/ui/button.tsx index 65d4fcd..5c74207 100644 --- a/src/components/ui/button.tsx +++ b/src/components/ui/button.tsx @@ -2,7 +2,7 @@ import * as React from "react" import { Slot } from "@radix-ui/react-slot" import { cva, type VariantProps } from "class-variance-authority" -import { cn } from "@/lib/utils" +import { cn } from "@lib/utils" const buttonVariants = cva( "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", diff --git a/src/db/index.ts b/src/db/index.ts index 72643cf..2a0475c 100644 --- a/src/db/index.ts +++ b/src/db/index.ts @@ -1,8 +1,6 @@ import 'dotenv/config'; import { drizzle } from 'drizzle-orm/node-postgres'; import { Pool } from 'pg'; -import { sql } from 'drizzle-orm'; - // db/index.ts diff --git a/src/lib/client.ts b/src/lib/client.ts deleted file mode 100644 index 107264a..0000000 --- a/src/lib/client.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { PrismaClient } from '@prisma/client' - -let prisma = new PrismaClient() - -export default prisma \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json index ce97542..0adc16b 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -30,6 +30,7 @@ "/src/types/*"], "@components/*": [ "/src/components/*", + "/src/components/ui/*", "/src/components/Brands/*" ], "@actions/*": [ @@ -42,6 +43,7 @@ "/src/app/Fragments/*" ], "@lib/*": [ + "@lib/*", "/src/lib/*" ], "scss/*": [