Commit b0fff1c6 authored by Nawasan Wisitsingkhon's avatar Nawasan Wisitsingkhon

chage to view order in deposites

parent da2d8128
import * as React from "react"; import * as React from "react";
import Link from "@mui/material/Link"; import Link from "next/link";
import Typography from "@mui/material/Typography"; import Typography from "@mui/material/Typography";
import Title from "./Title"; import Title from "./Title";
import { AdminOrderContext } from "../layout/AdminLayout"; import { AdminOrderContext } from "../layout/AdminLayout";
...@@ -30,8 +30,8 @@ export default function Deposits() { ...@@ -30,8 +30,8 @@ export default function Deposits() {
total += Number(adminOrder.value[i].total_price); total += Number(adminOrder.value[i].total_price);
} }
} }
setMonth(month_now) setMonth(month_now);
setYear(year_now) setYear(year_now);
setTotalSelling(total); setTotalSelling(total);
}, [user, adminOrder]); }, [user, adminOrder]);
...@@ -42,11 +42,11 @@ export default function Deposits() { ...@@ -42,11 +42,11 @@ export default function Deposits() {
${Number(totalSelling).toLocaleString()} ${Number(totalSelling).toLocaleString()}
</Typography> </Typography>
<Typography color="text.secondary" sx={{ flex: 1 }}> <Typography color="text.secondary" sx={{ flex: 1 }}>
on {month}, {year} on {month}, {year}
</Typography> </Typography>
<div> <div>
<Link color="primary" href="#" onClick={preventDefault}> <Link className="text-blue-600" href="/admin/order">
View balance View orders
</Link> </Link>
</div> </div>
</React.Fragment> </React.Fragment>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment