create data bank and component list
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
import UserAccountPage from "@/components/panel/userAccount";
|
||||
import Information from "@/data/information.json";
|
||||
import Bank from "@/data/bank.json";
|
||||
|
||||
function UserAccount() {
|
||||
return <UserAccountPage data={Information} />;
|
||||
return <UserAccountPage data={{information: Information, bank: Bank}} />;
|
||||
}
|
||||
|
||||
export default UserAccount;
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
import React from 'react'
|
||||
|
||||
function List() {
|
||||
return (
|
||||
<div>List</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default List
|
||||
@@ -1,9 +1,13 @@
|
||||
import Head from "./head";
|
||||
import List from "./List";
|
||||
|
||||
function Bank({ data }) {
|
||||
console.log(data);
|
||||
|
||||
function Bank() {
|
||||
return (
|
||||
<div>
|
||||
<Head />
|
||||
<List />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -7,12 +7,12 @@ import Tab from "./Tab";
|
||||
|
||||
const listTab = ["حساب کاربری", "حساب بانکی"];
|
||||
|
||||
function UserAccountPage() {
|
||||
function UserAccountPage({data}) {
|
||||
const [value, setValue] = useState(1);
|
||||
|
||||
const handleChange = (event, newValue) => setValue(newValue);
|
||||
|
||||
const components = [<Account />, <Bank />];
|
||||
const components = [<Account />, <Bank data={data.bank} />];
|
||||
|
||||
return (
|
||||
<div
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
[
|
||||
{
|
||||
"card_number": "6037154532659987",
|
||||
"shaba_number": "IR502229107590758200000000",
|
||||
"bank": "مسکن",
|
||||
"status": true
|
||||
},
|
||||
{
|
||||
"card_number": "6037154532659987",
|
||||
"shaba_number": "IR502229107590758200000000",
|
||||
"bank": "مسکن",
|
||||
"status": false
|
||||
},
|
||||
{
|
||||
"card_number": "6037154532659987",
|
||||
"shaba_number": "IR502229107590758200000000",
|
||||
"bank": "مسکن",
|
||||
"status": false
|
||||
}
|
||||
]
|
||||
Reference in New Issue
Block a user