mirror of
https://gitea.gofwd.group/dstrawsb/ballistic-builder.git
synced 2025-12-06 02:36:44 -05:00
getting rid of crap, fixing errors
This commit is contained in:
@@ -1,9 +0,0 @@
|
||||
import { pgTable, integer, varchar } from "drizzle-orm/pg-core";
|
||||
import { sql } from "drizzle-orm";
|
||||
import { timestamps } from "../../drizzle/schema/helpers/columns.helpers";
|
||||
|
||||
export const accounts = pgTable("base_table", {
|
||||
id: integer().primaryKey().generatedAlwaysAsIdentity({ name: "base_id_seq", startWith: 1, increment: 1, minValue: 1, maxValue: 2147483647, cache: 1 }),
|
||||
|
||||
...timestamps
|
||||
})
|
||||
@@ -1,10 +0,0 @@
|
||||
import Link from "next/link";
|
||||
|
||||
export default function BB_Base_Component() {
|
||||
|
||||
return (
|
||||
(
|
||||
<div />
|
||||
)
|
||||
)
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
import React, { Component } from 'react'
|
||||
import PropTypes from 'prop-types' //ES6
|
||||
import styles from './styles.module.css'
|
||||
|
||||
export default class BasicClassComponent extends Component {
|
||||
constructor(props){
|
||||
super(props)
|
||||
this.state = {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
render(){
|
||||
return (
|
||||
<div >
|
||||
<h1>Basic Component</h1>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
BasicClassComponent.propTypes = {
|
||||
|
||||
};
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
{
|
||||
"name": "basicclasscomponent",
|
||||
"version": "0.0.0",
|
||||
"private": true,
|
||||
"main": "./index",
|
||||
"author": {
|
||||
"name": "Don Strawsburg",
|
||||
"email": "don@goforward.group",
|
||||
"url": "https://goforward.group/"
|
||||
},
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Don Strawsburg",
|
||||
"email": "don@goforward.group",
|
||||
"url": "https://goforward.group/"
|
||||
},
|
||||
{
|
||||
"name": "Sean Strawsburg",
|
||||
"email": "sean@goforward.group",
|
||||
"url": "https://goforward.group/"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
import styles from './styles.module.css'
|
||||
|
||||
export const BasicFunctionComponent = () => {
|
||||
return (
|
||||
<div>
|
||||
|
||||
</div>
|
||||
)
|
||||
}
|
||||
export default BasicFunctionComponent;
|
||||
@@ -1,23 +0,0 @@
|
||||
{
|
||||
"name": "basicfunctioncomponent",
|
||||
"version": "0.0.0",
|
||||
"private": true,
|
||||
"main": "./index",
|
||||
"author": {
|
||||
"name": "Don Strawsburg",
|
||||
"email": "don@goforward.group",
|
||||
"url": "https://goforward.group/"
|
||||
},
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Don Strawsburg",
|
||||
"email": "don@goforward.group",
|
||||
"url": "https://goforward.group/"
|
||||
},
|
||||
{
|
||||
"name": "Sean Strawsburg",
|
||||
"email": "sean@goforward.group",
|
||||
"url": "https://goforward.group/"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
.card {
|
||||
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
|
||||
max-width: 80%;
|
||||
margin: auto;
|
||||
text-align: center;
|
||||
padding: 1em;
|
||||
}
|
||||
|
||||
.close {
|
||||
font-size: 1.5em;
|
||||
float: right;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
import React from "react";
|
||||
import "./index.css";
|
||||
class Card extends React.Component {
|
||||
|
||||
constructor( props ) {
|
||||
super(props)
|
||||
this.state = { show : true };
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<div className="card" >
|
||||
<span
|
||||
className="close" onClick={this.props.dataclick}
|
||||
datatitle={this.props.title}>×</span>
|
||||
<h3>{this.props.title}</h3>
|
||||
<p>{this.props.content}</p>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
export default Card;
|
||||
@@ -1,3 +0,0 @@
|
||||
.cardList {
|
||||
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
import React from "react";
|
||||
import ReactDOM from "react-dom";
|
||||
import Card from "../Card/";
|
||||
import data from "../../data.json";
|
||||
|
||||
class CardList extends React.Component {
|
||||
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = { cards: data.cards };
|
||||
}
|
||||
|
||||
remove() {
|
||||
|
||||
}
|
||||
render() {
|
||||
return (
|
||||
<div>
|
||||
{
|
||||
this.state.cards.map((card, index) => {
|
||||
return <Card
|
||||
key={index}
|
||||
title={card.title}
|
||||
content={card.content}
|
||||
dataclick={this.remove}
|
||||
/>
|
||||
})
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
export default CardList;
|
||||
|
||||
@@ -4,7 +4,7 @@ export default function PrivacyPolicy() {
|
||||
|
||||
return (
|
||||
|
||||
(
|
||||
<div>
|
||||
<section id="about" className="bg-gray-200 py-20">
|
||||
<div className="container mx-auto px-6 text-center">
|
||||
<h3 className="text-3xl text-gray-700 font-bold mb-6 ">Privacy Policy</h3>
|
||||
@@ -14,8 +14,65 @@ export default function PrivacyPolicy() {
|
||||
enthusiasts, we make firearm building easy and accessible.
|
||||
</p>
|
||||
|
||||
<p className="text-sm mb-6">Effective Date: <span className="font-medium">[Insert Date]</span></p>
|
||||
|
||||
<p className="mb-4">At Ballistic Builder, we are committed to protecting your privacy and safeguarding your personal information. This Privacy Policy outlines how we collect, use, disclose, and protect your data when you visit our website or use our services.</p>
|
||||
|
||||
<h2 className="text-xl font-semibold mb-2">1. Information We Collect</h2>
|
||||
<p className="mb-4">We only collect information necessary to provide and improve our services, such as:</p>
|
||||
|
||||
<p className="mb-2"><strong>Personal Information:</strong> Name, email address, and other details you provide when signing up or contacting us.</p>
|
||||
<p><strong>Non-Personal Information:</strong> Browser type, IP address, and website usage statistics to enhance your experience on our site.</p>
|
||||
|
||||
|
||||
<h2 className="text-xl font-semibold mb-2">2. How We Use Your Information</h2>
|
||||
<p className="mb-4">We use your information to:</p>
|
||||
|
||||
<p className="mb-2">Provide and manage our services.</p>
|
||||
<p className="mb-2">Respond to your inquiries and provide customer support.</p>
|
||||
<p className="mb-2">Improve our website and offerings.</p>
|
||||
<p>Communicate with you about updates or relevant information.</p>
|
||||
|
||||
|
||||
<h2 className="text-xl font-semibold mb-2">3. Information Sharing and Disclosure</h2>
|
||||
<p className="mb-4">We do not sell, trade, or share your personal information with third parties, except as necessary to:</p>
|
||||
|
||||
<p className="mb-2">Comply with legal obligations or protect our rights.</p>
|
||||
<p>Partner with trusted service providers who assist in website functionality and operations. These providers are bound by confidentiality agreements.</p>
|
||||
|
||||
<h2 className="text-xl font-semibold mb-2">4. Data Security</h2>
|
||||
<p className="mb-4">We take reasonable measures to protect your information from unauthorized access, alteration, disclosure, or destruction. However, no online platform can guarantee absolute security.</p>
|
||||
|
||||
<h2 className="text-xl font-semibold mb-2">5. Your Rights</h2>
|
||||
<p className="mb-4">You have the right to:</p>
|
||||
<p className="mb-2">Access, update, or delete your personal information.</p>
|
||||
<p className="mb-2">Opt-out of communications from us at any time.</p>
|
||||
<p>Request details about how your data is handled.</p>
|
||||
|
||||
|
||||
<h2 className="text-xl font-semibold mb-2">6. Cookies and Tracking Technologies</h2>
|
||||
<p className="mb-4">Ballistic Builder uses cookies to improve functionality and user experience. You can manage your cookie preferences through your browser settings.</p>
|
||||
|
||||
<h2 className="text-xl font-semibold mb-2">7. Changes to This Privacy Policy</h2>
|
||||
<p className="mb-4">We may update this Privacy Policy periodically. Any changes will be posted on this page with an updated effective date. We encourage you to review it regularly.</p>
|
||||
|
||||
<h2 className="text-xl font-semibold mb-2">8. Contact Us</h2>
|
||||
<p className="mb-4">If you have questions or concerns about this Privacy Policy or how we handle your information, please contact us at:</p>
|
||||
<p className="mb-4">
|
||||
Email: <span className="font-medium">[Insert Contact Email]</span><br />
|
||||
Phone: <span className="font-medium">[Insert Phone Number]</span><b />
|
||||
Address: <span className="font-medium">[Insert Address]</span>
|
||||
</p>
|
||||
|
||||
<p className="mt-6">Your privacy is our priority. Thank you for trusting Ballistic Builder.</p>
|
||||
|
||||
|
||||
</div>
|
||||
</section>
|
||||
)
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
)
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
import { User } from "@db/schema/User";
|
||||
import { users } from "@schemas/schema";
|
||||
import { getData } from "@actions/accountActions";
|
||||
|
||||
export default async function MyAccountsPage() {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { getProductType } from "@queries/PSA";
|
||||
import styles from '../styles.module.css';
|
||||
import PageHero from "@src/components/PageHero";
|
||||
import SortTable from "@src/components/SortTable";
|
||||
import PageHero from "@components/PageHero";
|
||||
import SortTable from "@components/SortTable";
|
||||
import { Suspense } from "react";
|
||||
import Loading from "@src/app/components/Loading/loading";
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { getGrips } from "@queries/PSA";
|
||||
|
||||
import styles from '../styles.module.css';
|
||||
import PageHero from "@src/components/PageHero";
|
||||
import SortTable from "@src/components/SortTable";
|
||||
import PageHero from "@components/PageHero";
|
||||
import SortTable from "@components/SortTable";
|
||||
|
||||
export default async function GripsPage() {
|
||||
const data = await getGrips();
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { getARHandGuards } from "@queries/PSA";
|
||||
import styles from '../styles.module.css';
|
||||
import PageHero from "@src/components/PageHero";
|
||||
import SortTable from "@src/components/SortTable";
|
||||
import PageHero from "@components/PageHero";
|
||||
import SortTable from "@components/SortTable";
|
||||
|
||||
export default async function HamdGuardsPage() {
|
||||
const data = await getARHandGuards();
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import Footer from "@src/components/footer";
|
||||
import Navbar from "@src/components/Navbar";
|
||||
import PopNav from "@src/components/PopNav/page";
|
||||
import PageHero from "@src/components/PageHero";
|
||||
import Footer from "@components/footer";
|
||||
import Navbar from "@components/Navbar";
|
||||
import PopNav from "@components/PopNav/page";
|
||||
import PageHero from "@components/PageHero";
|
||||
import { metadata } from "../layout";
|
||||
|
||||
|
||||
@@ -13,8 +13,7 @@ export default function RootLayout({
|
||||
return (
|
||||
|
||||
<div className="flex min-h-full flex-col">
|
||||
{/*
|
||||
<PageHero title="Category" /> */}
|
||||
|
||||
<div className="mx-auto flex w-full max-w-7xl items-start gap-x-8 ">
|
||||
<aside className="sticky top-8 hidden w-44 shrink-0 lg:block pt-4">
|
||||
{/* Left column area */}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { getProductType } from "@queries/PSA";
|
||||
import partTypes from 'src/data/parts_cats.json';
|
||||
import styles from "../styles.module.css";
|
||||
import SortTable from "@src/components/SortTable";
|
||||
import PageHero from "@src/components/PageHero";
|
||||
import SortTable from "@components/SortTable";
|
||||
import PageHero from "@components/PageHero";
|
||||
|
||||
export default async function LowerReceiverPage() {
|
||||
const data = await getProductType(partTypes["AR COMPLETE LOWERS"]);
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import { getMags } from "@queries/PSA";
|
||||
import styles from '../styles.module.css';
|
||||
import PageHero from "@src/components/PageHero";
|
||||
import SortTable from "@src/components/SortTable";
|
||||
import SortTable from "@components/SortTable";
|
||||
|
||||
export const metadata = {
|
||||
title: 'Magazines',
|
||||
@@ -12,7 +11,6 @@ export default async function MagsPage() {
|
||||
const data = await getMags();
|
||||
|
||||
|
||||
|
||||
return (
|
||||
<div>
|
||||
<div className="container mx-auto">
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { getMuzzleDevices } from "@queries/PSA";
|
||||
import styles from '../styles.module.css';
|
||||
import PageHero from "@src/components/PageHero";
|
||||
import SortTable from "@src/components/SortTable";
|
||||
import PageHero from "@components/PageHero";
|
||||
import SortTable from "@components/SortTable";
|
||||
|
||||
export default async function MuzzleDevices() {
|
||||
const data = await getMuzzleDevices();
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { getARParts } from "@queries/PSA";
|
||||
import styles from '../styles.module.css';
|
||||
import SortTable from "@src/components/SortTable";
|
||||
import PageHero from "@src/components/PageHero";
|
||||
import SortTable from "@components/SortTable";
|
||||
import PageHero from "@components/PageHero";
|
||||
|
||||
export default async function PartsPage() {
|
||||
const data = await getARParts();
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { getStocks } from "@queries/PSA";
|
||||
import { psa } from '@db/schema/Psa';
|
||||
import { psa } from '@schemas/schema';
|
||||
import partTypes from 'src/data/parts_cats.json';
|
||||
import styles from '../styles.module.css';
|
||||
import PageHero from "@src/components/PageHero";
|
||||
import ProductTable from "@src/components/ProductTable";
|
||||
import SortTable from "@src/components/SortTable";
|
||||
import PageHero from "@components/PageHero";
|
||||
import ProductTable from "@components/ProductTable";
|
||||
import SortTable from "@components/SortTable";
|
||||
|
||||
export default async function StocksPage() {
|
||||
const psa = await getStocks();
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { getARTriggers } from "@queries/PSA";
|
||||
import styles from '../styles.module.css';
|
||||
import PageHero from "@src/components/PageHero";
|
||||
import SortTable from "@src/components/SortTable";
|
||||
import PageHero from "@components/PageHero";
|
||||
import SortTable from "@components/SortTable";
|
||||
|
||||
export default async function TriggersPage() {
|
||||
const data = await getARTriggers();
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { getUpperReciever } from "@queries/PSA";
|
||||
import styles from '../styles.module.css';
|
||||
import PageHero from "@src/components/PageHero";
|
||||
import SortTable from "@src/components/SortTable";
|
||||
import PageHero from "@components/PageHero";
|
||||
import SortTable from "@components/SortTable";
|
||||
|
||||
export default async function UpperReceiverPage() {
|
||||
const data = await getUpperReciever();
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import "../styles/globals.css";
|
||||
import Navbar from "../components/Navbar";
|
||||
import PopNav from "@src/components/PopNav/page";
|
||||
import PopNav from "@components/PopNav/page";
|
||||
import { Roboto } from 'next/font/google'
|
||||
import constants from "@src/lib/constants";
|
||||
import Footer from "@src/components/footer";
|
||||
import Footer from "@components/footer";
|
||||
|
||||
export const metadata = {
|
||||
title: constants.APP_NAME,
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import BetaTester from "@src/components/BetaTester";
|
||||
import BetaTester from "@components/BetaTester";
|
||||
import Link from 'next/link';
|
||||
|
||||
import { globalConfig } from '@src/customGlobals';
|
||||
import constants from "@src/lib/constants";
|
||||
export default async function Home( ) {
|
||||
return (
|
||||
<div className="bg-white ">
|
||||
|
||||
@@ -8,6 +8,7 @@ import {
|
||||
MenuItems,
|
||||
} from "@headlessui/react";
|
||||
import { Bars3Icon, BellIcon, XMarkIcon } from "@heroicons/react/24/outline";
|
||||
import constants from "@src/lib/constants";
|
||||
import Image from "next/image";
|
||||
import Link from "next/link";
|
||||
|
||||
@@ -29,7 +30,7 @@ export default function Navbar() {
|
||||
<div className="relative flex h-16 items-center justify-between">
|
||||
<div className="absolute inset-y-0 left-0 flex items-center sm:hidden">
|
||||
{/* Mobile menu button*/}
|
||||
{/* <DisclosureButton className="group relative inline-flex items-center justify-center rounded-md p-2 text-gray-400 hover:bg-gray-700 hover:text-white focus:outline-none focus:ring-2 focus:ring-inset focus:ring-white">
|
||||
<DisclosureButton className="group relative inline-flex items-center justify-center rounded-md p-2 text-gray-400 hover:bg-gray-700 hover:text-white focus:outline-none focus:ring-2 focus:ring-inset focus:ring-white">
|
||||
<span className="absolute -inset-0.5" />
|
||||
<span className="sr-only">Open main menu</span>
|
||||
<Bars3Icon
|
||||
@@ -40,11 +41,11 @@ export default function Navbar() {
|
||||
aria-hidden="true"
|
||||
className="hidden size-6 group-data-[open]:block"
|
||||
/>
|
||||
</DisclosureButton> */}
|
||||
</DisclosureButton>
|
||||
</div>
|
||||
<div className="flex flex-1 items-center justify-center sm:items-stretch sm:justify-start">
|
||||
<div className="flex shrink-0 items-center text-white">
|
||||
<Link href={"/"} className="text-gray-100 "><p className="text-white">Ballistics Builder</p></Link>
|
||||
<Link href={"/"} className="text-gray-100 "><p className="text-white">{constants.APP_NAME}</p></Link>
|
||||
</div>
|
||||
|
||||
{/* <div className="hidden sm:ml-6 sm:block">
|
||||
@@ -75,13 +76,13 @@ export default function Navbar() {
|
||||
<MenuButton className="relative flex rounded-full bg-lime-800 text-sm focus:outline-none focus:ring-2 focus:ring-white focus:ring-offset-2 focus:ring-offset-gray-800">
|
||||
<span className="absolute -inset-1.5" />
|
||||
<span className="sr-only">Open user menu</span>
|
||||
{/* <Image
|
||||
<Image
|
||||
alt=""
|
||||
src="https://tailwindui.com/plus/img/logos/mark.svg?color=indigo&shade=600"
|
||||
className="size-8 rounded-full"
|
||||
width={100}
|
||||
height={100}
|
||||
/> */}
|
||||
/>
|
||||
<img
|
||||
alt=""
|
||||
src="https://tailwindui.com/plus/img/logos/mark.svg?color=lime&shade=100"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { psa } from "@db/schema/Psa";
|
||||
import { psa } from "@schemas/schema";
|
||||
import Image from "next/image";
|
||||
import Link from "next/link";
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@ import { PlusCircleIcon } from "@heroicons/react/20/solid";
|
||||
import Image from "next/image";
|
||||
import Link from "next/link";
|
||||
import { TestProductPage } from "../../app/components/TestProductPage";
|
||||
import { Suspense } from "react";
|
||||
|
||||
export default async function SortTable(props: any) {
|
||||
return (
|
||||
|
||||
@@ -4,6 +4,8 @@ import { useToast } from '@chakra-ui/toast';
|
||||
import { FormControl, FormLabel, } from '@chakra-ui/form-control';
|
||||
import { Input, Button, Stack, Heading } from '@chakra-ui/react';
|
||||
import { drizzle } from 'drizzle-orm/node-postgres';
|
||||
import { users } from '@schemas/schema';
|
||||
|
||||
|
||||
export default function UserRegistration() {
|
||||
const [formData, setFormData] = useState({
|
||||
|
||||
5
src/customGlobals.ts
Normal file
5
src/customGlobals.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
// _customGlobals.tsx
|
||||
export const globalConfig = {
|
||||
siteTitle: 'My Next.js App',
|
||||
apiUrl: process.env.CUSTOM_API_URL,
|
||||
};
|
||||
@@ -1,25 +1,25 @@
|
||||
// db/queries.ts
|
||||
"use server";
|
||||
import { eq, not , asc} from "drizzle-orm";
|
||||
import { Account } from '@schemas/Account'
|
||||
import { accounts } from '@schemas/schema'
|
||||
import { db } from '../../index';
|
||||
|
||||
// Fetch all account
|
||||
export async function getAllAccounts() {
|
||||
return await db.select().from(Account);
|
||||
return await db.select().from(accounts);
|
||||
}
|
||||
|
||||
// Add a new account
|
||||
export async function addAcount(first_name: string, last_name : string, username : string, password_hash: string ) {
|
||||
return await db.insert(Account).values({ first_name, last_name, username, password_hash }).returning();
|
||||
return await db.insert(accounts).values({ first_name, last_name, username, password_hash }).returning();
|
||||
}
|
||||
|
||||
// Update a account
|
||||
export async function updateAcount(id: number, first_name: string, last_name : string, username : string, password_hash: string ) {
|
||||
return await db.update(Account).set({ first_name, last_name, username, password_hash }).where(eq(Account.id, id));
|
||||
return await db.update(accounts).set({ first_name, last_name, username, password_hash }).where(eq(accounts.id, id));
|
||||
}
|
||||
|
||||
// Delete a account
|
||||
export async function deleteAccount(id: number) {
|
||||
return await db.delete(Account).where(eq(Account.id, id));
|
||||
return await db.delete(accounts).where(eq(accounts.id, id));
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
import { db } from '../../index';
|
||||
import { db } from '@db/index';
|
||||
import { psa } from '@schemas/schema';
|
||||
import { eq, lt, gte, ne, and, like } from 'drizzle-orm';
|
||||
import CATEGORY from '@src/data/parts_cats.json';
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"use server";
|
||||
import { eq, not , asc} from "drizzle-orm";
|
||||
import { products } from '@schemas/schema';
|
||||
import { db } from '../../index';
|
||||
import { db } from '@db/index';
|
||||
|
||||
// Fetch all products
|
||||
export async function getAllProducts() {
|
||||
@@ -15,8 +15,8 @@ export async function addProduct() {
|
||||
}
|
||||
|
||||
// Update a Product
|
||||
export async function updateProduct( ) {
|
||||
return await db.update(products).set({ }).where(eq(Product.id, id));
|
||||
export async function updateProduct( id:number) {
|
||||
return await db.update(products).set({ }).where(eq(products.id, id));
|
||||
}
|
||||
|
||||
// Delete a product
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
import { eq, not , asc} from "drizzle-orm";
|
||||
import { revalidatePath } from "next/cache";
|
||||
import { db } from "@db/index";
|
||||
import { State } from "@db/schema/States";
|
||||
import { states } from "@schemas/schema";
|
||||
|
||||
export const getData = async () => {
|
||||
const data = await db.select().from(Account).orderBy(asc(Account.last_name));
|
||||
const data = await db.select().from(states).orderBy(asc(states.abbreviation));
|
||||
return data;
|
||||
};
|
||||
5
src/pages/_app.tsx
Normal file
5
src/pages/_app.tsx
Normal file
@@ -0,0 +1,5 @@
|
||||
import type { AppProps } from 'next/app'
|
||||
|
||||
export default function MyApp({ Component, pageProps }: AppProps) {
|
||||
return <Component {...pageProps} />
|
||||
}
|
||||
Reference in New Issue
Block a user