mirror of
https://gitea.gofwd.group/dstrawsb/ballistic-builder.git
synced 2025-12-06 02:36:44 -05:00
updated to use ProductTable
Co-authored-by: sstrawsburg@gmail.com <sstrawsburg@gmail.com>
This commit is contained in:
@@ -3,6 +3,7 @@ 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';
|
||||||
import PageHero from "@src/components/PageHero";
|
import PageHero from "@src/components/PageHero";
|
||||||
|
import ProductTable from "@src/components/ProductTable";
|
||||||
|
|
||||||
export default async function GripsPage() {
|
export default async function GripsPage() {
|
||||||
const psa = await getGrips();
|
const psa = await getGrips();
|
||||||
@@ -11,6 +12,7 @@ export default async function GripsPage() {
|
|||||||
<div>
|
<div>
|
||||||
<PageHero title="AR Grips" />
|
<PageHero title="AR Grips" />
|
||||||
<div className="container mx-auto">
|
<div className="container mx-auto">
|
||||||
|
<ProductTable data={psa}></ProductTable>
|
||||||
<table className="table-auto border-collapse border-spacing-3 border border-slate-500">
|
<table className="table-auto border-collapse border-spacing-3 border border-slate-500">
|
||||||
<thead>
|
<thead>
|
||||||
<tr className={styles.tr}>
|
<tr className={styles.tr}>
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ 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';
|
||||||
import PageHero from "@src/components/PageHero";
|
import PageHero from "@src/components/PageHero";
|
||||||
|
import ProductTable from "@src/components/ProductTable";
|
||||||
|
|
||||||
export default async function HamdGuardsPage() {
|
export default async function HamdGuardsPage() {
|
||||||
const psa = await getARHandGuards();
|
const psa = await getARHandGuards();
|
||||||
@@ -11,29 +12,7 @@ export default async function HamdGuardsPage() {
|
|||||||
<div>
|
<div>
|
||||||
<PageHero title="Hand Guards" />
|
<PageHero title="Hand Guards" />
|
||||||
<div className="container mx-auto">
|
<div className="container mx-auto">
|
||||||
<table className={"table-auto border-separate border-spacing-4 border border-slate-500"}>
|
<ProductTable data={psa}></ProductTable>
|
||||||
<thead>
|
|
||||||
<tr className={styles.tr}>
|
|
||||||
<th className='bg-slate-700 pl-2 w-40'>Component</th>
|
|
||||||
<th className='bg-slate-700 w-40'>Manufacturer</th>
|
|
||||||
<th className='bg-slate-700 w-40'>Model #</th>
|
|
||||||
<th className='bg-slate-700 w-40'>Price</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
{psa.map((psa) => (
|
|
||||||
<tr key={psa.upc}>
|
|
||||||
<td className='text-slate-800'>{psa.category}</td>
|
|
||||||
<td className='text-slate-800'>{psa.brandName}</td>
|
|
||||||
<td className='text-slate-800'>{psa.modelnumber}</td>
|
|
||||||
<td className='text-slate-800 flex items-center gap-2'>
|
|
||||||
${Number(psa.salePrice).toFixed(2)}
|
|
||||||
<button >Buy</button>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
))}
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ 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';
|
||||||
import PageHero from "@src/components/PageHero";
|
import PageHero from "@src/components/PageHero";
|
||||||
|
import ProductTable from "@src/components/ProductTable";
|
||||||
|
|
||||||
export default async function StocksPage() {
|
export default async function StocksPage() {
|
||||||
const psa = await getStocks();
|
const psa = await getStocks();
|
||||||
@@ -11,29 +12,7 @@ export default async function StocksPage() {
|
|||||||
<div>
|
<div>
|
||||||
<PageHero title="Stocks" />
|
<PageHero title="Stocks" />
|
||||||
<div className="container mx-auto">
|
<div className="container mx-auto">
|
||||||
<table className="table-auto border-separate border-spacing-4 border border-slate-500">
|
<ProductTable data={psa}></ProductTable>
|
||||||
<thead>
|
|
||||||
<tr className={styles.tr}>
|
|
||||||
<th className='bg-slate-700 pl-2 w-40'>Component</th>
|
|
||||||
<th className='bg-slate-700 w-40'>Manufacturer</th>
|
|
||||||
<th className='bg-slate-700 w-40'>Model #</th>
|
|
||||||
<th className='bg-slate-700 w-20'>Price</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
{psa.map((psa) => (
|
|
||||||
<tr key={psa.upc}>
|
|
||||||
<td className='text-slate-800'>{psa.category}</td>
|
|
||||||
<td className='text-slate-800'>{psa.brandName}</td>
|
|
||||||
<td className='text-slate-800'>{psa.modelnumber}</td>
|
|
||||||
<td className='text-slate-800 flex items-center gap-2'>
|
|
||||||
${Number(psa.salePrice).toFixed(2)}
|
|
||||||
<button >Buy</button>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
))}
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ 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';
|
||||||
import PageHero from "@src/components/PageHero";
|
import PageHero from "@src/components/PageHero";
|
||||||
|
import ProductTable from "@src/components/ProductTable";
|
||||||
|
|
||||||
export default async function TriggersPage() {
|
export default async function TriggersPage() {
|
||||||
const psa = await getARTriggers();
|
const psa = await getARTriggers();
|
||||||
@@ -11,29 +12,7 @@ export default async function TriggersPage() {
|
|||||||
<div>
|
<div>
|
||||||
<PageHero title="AR Triggers" />
|
<PageHero title="AR Triggers" />
|
||||||
<div className="container mx-auto">
|
<div className="container mx-auto">
|
||||||
<table className={"table-auto border-separate border-spacing-4 border border-slate-500"}>
|
<ProductTable data={psa}></ProductTable>
|
||||||
<thead>
|
|
||||||
<tr className={styles.tr}>
|
|
||||||
<th className='bg-slate-700 w-40 pl-2'>Component</th>
|
|
||||||
<th className='bg-slate-700 w-40'>Manufacturer</th>
|
|
||||||
<th className='bg-slate-700 w-40'>Model #</th>
|
|
||||||
<th className='bg-slate-700 w-40'>Price</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
{psa.map((psa) => (
|
|
||||||
<tr key={psa.upc}>
|
|
||||||
<td className='text-slate-800'>{psa.category}</td>
|
|
||||||
<td className='text-slate-800'>{psa.brandName}</td>
|
|
||||||
<td className='text-slate-800'>{psa.modelnumber}</td>
|
|
||||||
<td className='text-slate-800 flex items-center gap-2'>
|
|
||||||
${Number(psa.salePrice).toFixed(2)}
|
|
||||||
<button>Buy</button>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
))}
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import { getPSA, getUpperReciever } from "@queries/PSA";
|
|||||||
import { psa } from '@db/schema/Psa';
|
import { psa } from '@db/schema/Psa';
|
||||||
import styles from '../styles.module.css';
|
import styles from '../styles.module.css';
|
||||||
import PageHero from "@src/components/PageHero";
|
import PageHero from "@src/components/PageHero";
|
||||||
|
import ProductTable from "@src/components/ProductTable";
|
||||||
|
|
||||||
export default async function UpperReceiverPage() {
|
export default async function UpperReceiverPage() {
|
||||||
const psa = await getUpperReciever();
|
const psa = await getUpperReciever();
|
||||||
@@ -10,29 +11,7 @@ export default async function UpperReceiverPage() {
|
|||||||
<div>
|
<div>
|
||||||
<PageHero title="Upper Recievers" />
|
<PageHero title="Upper Recievers" />
|
||||||
<div className="container mx-auto">
|
<div className="container mx-auto">
|
||||||
<table className={"table-auto border-separate border-spacing-4 border border-slate-500"}>
|
<ProductTable data={psa}></ProductTable>
|
||||||
<thead>
|
|
||||||
<tr className={styles.tr}>
|
|
||||||
<th className='bg-slate-700 w-40 pl-2'>Component</th>
|
|
||||||
<th className='bg-slate-700 w-40'>Manufacturer</th>
|
|
||||||
<th className='bg-slate-700 w-40'>Model #</th>
|
|
||||||
<th className='bg-slate-700 w-20'>Price</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
{psa.map((psa) => (
|
|
||||||
<tr key={psa.upc}>
|
|
||||||
<td className='text-slate-800'>{psa.category}</td>
|
|
||||||
<td className='text-slate-800'>{psa.brandName}</td>
|
|
||||||
<td className='text-slate-800'>{psa.modelnumber}</td>
|
|
||||||
<td className='text-slate-800 flex items-center gap-2'>
|
|
||||||
${Number(psa.salePrice).toFixed(2)}
|
|
||||||
<button >Buy</button>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
))}
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -8,7 +8,8 @@ export default async function ProductTable(props:any) {
|
|||||||
<th className='bg-slate-700 text-white pl-2 w-40'>Component</th>
|
<th className='bg-slate-700 text-white pl-2 w-40'>Component</th>
|
||||||
<th className='bg-slate-700 text-white w-40'>Manufacturer</th>
|
<th className='bg-slate-700 text-white w-40'>Manufacturer</th>
|
||||||
<th className='bg-slate-700 text-white w-40'>Model #</th>
|
<th className='bg-slate-700 text-white w-40'>Model #</th>
|
||||||
<th className='bg-slate-700 text-white w-40'>Price</th>
|
<th className='bg-slate-700 text-white w-40'>Retail Price</th>
|
||||||
|
<th className='bg-slate-700 text-white w-20'>Sale Price</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@@ -17,6 +18,7 @@ export default async function ProductTable(props:any) {
|
|||||||
<td className='text-slate-800'>{item.category}</td>
|
<td className='text-slate-800'>{item.category}</td>
|
||||||
<td className='text-slate-800'>{item.brandName}</td>
|
<td className='text-slate-800'>{item.brandName}</td>
|
||||||
<td className='text-slate-800'>{item.modelnumber}</td>
|
<td className='text-slate-800'>{item.modelnumber}</td>
|
||||||
|
<td className='text-slate-800'>{item.retailPrice}</td>
|
||||||
<td className="text-slate-800 flex items-center gap-2">
|
<td className="text-slate-800 flex items-center gap-2">
|
||||||
${Number(item.salePrice).toFixed(2)}
|
${Number(item.salePrice).toFixed(2)}
|
||||||
<button >Buy</button>
|
<button >Buy</button>
|
||||||
|
|||||||
Reference in New Issue
Block a user