Fixed error prompt in dashboard

This commit is contained in:
keannu125 2023-05-19 15:57:00 +08:00
parent 825c10d6a7
commit 9d6a1ec2ca

View file

@ -51,7 +51,8 @@ export default function Dashboard() {
</div> </div>
); );
} }
if (logs.error || products.error || lowest_stock_product.isError) { if (logs.isError || products.isError || lowest_stock_product.isError) {
return (
<div> <div>
<LoginChecker /> <LoginChecker />
<div style={styles.flex_row}> <div style={styles.flex_row}>
@ -63,7 +64,8 @@ export default function Dashboard() {
Error loading dashboard Error loading dashboard
</p> </p>
</div> </div>
</div>; </div>
);
} }
return ( return (
<div> <div>