From 85fdf259178145493a9dab4a9d8cd5a0a352d945 Mon Sep 17 00:00:00 2001 From: Don Strawsburg Date: Mon, 13 Jan 2025 17:24:58 -0500 Subject: [PATCH] small changes --- src/app/Accounts/page.tsx | 12 ++++++++++-- src/components/Account/index.tsx | 14 ++++++++++++++ src/components/Brand/brand.tsx | 6 +++++- src/lib/types/brandType.ts | 4 +++- tsconfig.json | 2 +- 5 files changed, 33 insertions(+), 5 deletions(-) create mode 100644 src/components/Account/index.tsx diff --git a/src/app/Accounts/page.tsx b/src/app/Accounts/page.tsx index 977a7e0..e4a074c 100644 --- a/src/app/Accounts/page.tsx +++ b/src/app/Accounts/page.tsx @@ -1,11 +1,19 @@ -import { Account } from "@db/schema/Account"; +import { accounts } from "@schemas/schema"; import { getData } from "@actions/accountActions"; +import Account from "@components/Account"; // Adjust the import path as necessary +import React from 'react'; + + +export interface AccountProps { + account: any; // Adjust the type according to your data structure +} + export default async function AccountsPage() { const data = await getData(); return (
- {/* */} +
); } diff --git a/src/components/Account/index.tsx b/src/components/Account/index.tsx new file mode 100644 index 0000000..3ac09a4 --- /dev/null +++ b/src/components/Account/index.tsx @@ -0,0 +1,14 @@ +import { AccountProps } from "@src/app/Accounts/page"; +import React from "react"; + + +export const Account: React.FC = ({ account }) => { + return ( +
+

{account.name}

+

{account.email}

+ {/* Add more fields as necessary */} +
+ ); +}; +export default Account; \ No newline at end of file diff --git a/src/components/Brand/brand.tsx b/src/components/Brand/brand.tsx index 53769ca..471d104 100644 --- a/src/components/Brand/brand.tsx +++ b/src/components/Brand/brand.tsx @@ -1,6 +1,10 @@ "use client"; import { ChangeEvent, FC, useState } from "react"; -import { brandType } from "src/types/brandType"; + +type brandType = { + id: number; + name: string; +}; interface Props { brand: brandType; changeBrandName: (id: number, name: string) => void; diff --git a/src/lib/types/brandType.ts b/src/lib/types/brandType.ts index 3b79d0a..ffe0337 100644 --- a/src/lib/types/brandType.ts +++ b/src/lib/types/brandType.ts @@ -1,4 +1,6 @@ export type brandType = { id: number; name: string; - }; \ No newline at end of file + }; + + export default brandType; \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json index 60f6d62..dd162f4 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -39,7 +39,7 @@ "./src/db/*" ], "@types/*": [ - "./src/types/*" + "./src/lib/types/*" ], "@components/*": [ "./src/components/*",