small changes

This commit is contained in:
2025-01-13 17:24:58 -05:00
parent 0eb54c6024
commit 85fdf25917
5 changed files with 33 additions and 5 deletions

View File

@@ -1,11 +1,19 @@
import { Account } from "@db/schema/Account"; import { accounts } from "@schemas/schema";
import { getData } from "@actions/accountActions"; 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() { export default async function AccountsPage() {
const data = await getData(); const data = await getData();
return ( return (
<div className="bg-gray-100 min-h-screen flex flex-col"> <div className="bg-gray-100 min-h-screen flex flex-col">
{/* <Account account={data} /> */} <Account account={data} />
</div> </div>
); );
} }

View File

@@ -0,0 +1,14 @@
import { AccountProps } from "@src/app/Accounts/page";
import React from "react";
export const Account: React.FC<AccountProps> = ({ account }) => {
return (
<div className="account-card">
<h2>{account.name}</h2>
<p>{account.email}</p>
{/* Add more fields as necessary */}
</div>
);
};
export default Account;

View File

@@ -1,6 +1,10 @@
"use client"; "use client";
import { ChangeEvent, FC, useState } from "react"; import { ChangeEvent, FC, useState } from "react";
import { brandType } from "src/types/brandType";
type brandType = {
id: number;
name: string;
};
interface Props { interface Props {
brand: brandType; brand: brandType;
changeBrandName: (id: number, name: string) => void; changeBrandName: (id: number, name: string) => void;

View File

@@ -2,3 +2,5 @@ export type brandType = {
id: number; id: number;
name: string; name: string;
}; };
export default brandType;

View File

@@ -39,7 +39,7 @@
"./src/db/*" "./src/db/*"
], ],
"@types/*": [ "@types/*": [
"./src/types/*" "./src/lib/types/*"
], ],
"@components/*": [ "@components/*": [
"./src/components/*", "./src/components/*",