From 5f3fcd86dd68205c0538bf940da00c12ad5ca6a5 Mon Sep 17 00:00:00 2001 From: Don Strawsburg Date: Fri, 13 Dec 2024 14:22:24 -0500 Subject: [PATCH] fixed 4 errors --- src/app/Products/parts/page.tsx | 4 ++-- src/app/signin/layout.tsx | 6 +++--- src/components/PopNav/page.tsx | 2 +- src/db/queries/PSA/index.ts | 10 ++++++++++ 4 files changed, 16 insertions(+), 6 deletions(-) diff --git a/src/app/Products/parts/page.tsx b/src/app/Products/parts/page.tsx index daf14f0..64cc0eb 100644 --- a/src/app/Products/parts/page.tsx +++ b/src/app/Products/parts/page.tsx @@ -1,9 +1,9 @@ import { getPSA, getLowerBuildKits, getProductType} from "@queries/PSA"; import { psa } from '@db/schema/Psa'; import partTypes from 'src/data/parts_cats.json'; -import styles from '../styles.module.css'; +import styles from '../styles.module.css'; -export default async function GripsPage() { +export default async function PartsPage() { const psa = await getProductType(partTypes["AR PARTS"]); return ( diff --git a/src/app/signin/layout.tsx b/src/app/signin/layout.tsx index b7963bb..63cecb6 100644 --- a/src/app/signin/layout.tsx +++ b/src/app/signin/layout.tsx @@ -10,8 +10,8 @@ export default function RootLayout({ children: React.ReactNode }) { return ( - - {children} - + <> + {children} + ) } diff --git a/src/components/PopNav/page.tsx b/src/components/PopNav/page.tsx index 666dfa3..a6a4e2e 100644 --- a/src/components/PopNav/page.tsx +++ b/src/components/PopNav/page.tsx @@ -80,7 +80,7 @@ const navigation = { }, ], pages: [ - { name: "Brands", href: "/Brands" }, + { name: "Single Product", href: "/product" }, ], }; diff --git a/src/db/queries/PSA/index.ts b/src/db/queries/PSA/index.ts index a869112..dbce09e 100644 --- a/src/db/queries/PSA/index.ts +++ b/src/db/queries/PSA/index.ts @@ -127,6 +127,16 @@ export async function getARTriggers(page = 1) { const limit = 40; const offset = (page - 1) * limit; + return await db.select() + .from(psa) + .limit(limit) + .where(and(like(psa.fineline, "%Trigger%"), like(psa.category, "Ar Parts"))) + .offset(offset); +} +export async function getARParts(page = 1) { + const limit = 40; + const offset = (page - 1) * limit; + return await db.select() .from(psa) .limit(limit)