mirror of
https://gitea.gofwd.group/dstrawsb/ballistic-builder.git
synced 2025-12-06 02:36:44 -05:00
product with links
This commit is contained in:
@@ -1,36 +1,48 @@
|
||||
import { Button } from "@components/ui/button";
|
||||
import { getPSA, getLowerBuildKits, getAKBarreledReceivers } from "@queries/PSA";
|
||||
import { psa } from '@db/schema/Psa';
|
||||
import styles from '../styles.module.css';
|
||||
import { getPSA, getLowerBuildKits, getARCompleteLowers } from "@queries/PSA";
|
||||
import { psa } from "@db/schema/Psa";
|
||||
import styles from "../styles.module.css";
|
||||
import PageHero from "@components/PageHero";
|
||||
import Link from "next/link";
|
||||
|
||||
export default async function LowerReceiverPage() {
|
||||
const psa = await getLowerBuildKits();
|
||||
const psa = await getARCompleteLowers();
|
||||
|
||||
return (
|
||||
<div className="container mx-auto py-5">
|
||||
<table className={"table-auto border-separate border-spacing-4 border border-slate-500 text-gray-900"}>
|
||||
<thead>
|
||||
<tr className={styles.tr}>
|
||||
<th>Component</th>
|
||||
<th>Manufacturer</th>
|
||||
<th>Model #</th>
|
||||
<th>Price</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{psa.map((psa) => (
|
||||
<tr key={psa.upc}>
|
||||
<td>{psa.category}</td>
|
||||
<td>{psa.brandName}</td>
|
||||
<td>{psa.modelnumber}</td>
|
||||
<td className="flex items-center gap-2">
|
||||
${Number(psa.salePrice).toFixed(2)}
|
||||
<Button variant="default">Buy</Button>
|
||||
</td>
|
||||
<div>
|
||||
<PageHero title="Lowers" />
|
||||
<div className="container mx-auto py-5">
|
||||
<table
|
||||
className={
|
||||
"table-auto border-separate border-spacing-4 border border-slate-500 text-gray-900"
|
||||
}
|
||||
>
|
||||
<thead>
|
||||
<tr className={styles.tr}>
|
||||
<th>Component</th>
|
||||
<th>Manufacturer</th>
|
||||
<th>Model #</th>
|
||||
<th>Price</th>
|
||||
</tr>
|
||||
))}
|
||||
</tbody>
|
||||
</table>
|
||||
</thead>
|
||||
<tbody>
|
||||
{psa.map((psa) => (
|
||||
<tr key={psa.upc}>
|
||||
<td>{psa.category}</td>
|
||||
<td>{psa.brandName}</td>
|
||||
<td>{psa.modelnumber}</td>
|
||||
<td className="flex items-center gap-2">
|
||||
${Number(psa.salePrice).toFixed(2)}
|
||||
{/* I dont think this is exactly correct but works for now? */}
|
||||
<Link href={psa.buyLink} passHref={true}>
|
||||
<Button variant="default">Buy</Button>
|
||||
</Link>
|
||||
</td>
|
||||
</tr>
|
||||
))}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user