forked from amer2004/SweetHome
Merge branch 'main' of http://45.93.137.91:3000/Rahaf/SweetHome
This commit is contained in:
@ -72,12 +72,17 @@ export default function OwnerAccountBookPage() {
|
|||||||
async function fetchData() {
|
async function fetchData() {
|
||||||
try {
|
try {
|
||||||
const data = await getOwnerStatistics();
|
const data = await getOwnerStatistics();
|
||||||
|
|
||||||
if (data) {
|
if (data) {
|
||||||
setStats({
|
setStats({
|
||||||
totalRevenue: data.totalRevenue ?? null,
|
totalRevenue: data.totalRevenue ?? null,
|
||||||
totalReservations: data.totalReservations ?? null,
|
totalReservations: data.totalReservations ?? null,
|
||||||
activeProperties: data.activeProperties ?? null,
|
activeProperties: data.activeProperties ?? null,
|
||||||
financialRevenue: data.financialRevenue ?? null,
|
|
||||||
|
|
||||||
|
financialRevenue:
|
||||||
|
data.financialRevenue ?? data.totalRevenue ?? null,
|
||||||
|
|
||||||
financialCommission: data.financialCommission ?? null,
|
financialCommission: data.financialCommission ?? null,
|
||||||
financialBalance: data.financialBalance ?? null,
|
financialBalance: data.financialBalance ?? null,
|
||||||
directRevenue: data.directRevenue ?? null,
|
directRevenue: data.directRevenue ?? null,
|
||||||
@ -92,7 +97,7 @@ export default function OwnerAccountBookPage() {
|
|||||||
} finally {
|
} finally {
|
||||||
setIsLoading(false);
|
setIsLoading(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
fetchData();
|
fetchData();
|
||||||
}, [router]);
|
}, [router]);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user