mirror of
https://gitea.gofwd.group/dstrawsb/ballistic-builder.git
synced 2025-12-06 02:36:44 -05:00
fixed 4 errors
This commit is contained in:
@@ -1,9 +1,9 @@
|
|||||||
import { getPSA, getLowerBuildKits, getProductType} from "@queries/PSA";
|
import { getPSA, getLowerBuildKits, getProductType} from "@queries/PSA";
|
||||||
import { psa } from '@db/schema/Psa';
|
import { psa } from '@db/schema/Psa';
|
||||||
import partTypes from 'src/data/parts_cats.json';
|
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"]);
|
const psa = await getProductType(partTypes["AR PARTS"]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -10,8 +10,8 @@ export default function RootLayout({
|
|||||||
children: React.ReactNode
|
children: React.ReactNode
|
||||||
}) {
|
}) {
|
||||||
return (
|
return (
|
||||||
<html lang="en">
|
<>
|
||||||
<body>{children}</body>
|
{children}
|
||||||
</html>
|
</>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ const navigation = {
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
pages: [
|
pages: [
|
||||||
{ name: "Brands", href: "/Brands" },
|
|
||||||
{ name: "Single Product", href: "/product" },
|
{ name: "Single Product", href: "/product" },
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -133,3 +133,13 @@ export async function getARTriggers(page = 1) {
|
|||||||
.where(and(like(psa.fineline, "%Trigger%"), like(psa.category, "Ar Parts")))
|
.where(and(like(psa.fineline, "%Trigger%"), like(psa.category, "Ar Parts")))
|
||||||
.offset(offset);
|
.offset(offset);
|
||||||
}
|
}
|
||||||
|
export async function getARParts(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);
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user