Feat:Added laoding animation
This commit is contained in:
@@ -4,6 +4,7 @@ import Farm from "./Farm";
|
|||||||
import CropTable from "./CropTable";
|
import CropTable from "./CropTable";
|
||||||
import Transactions from "./Transactions";
|
import Transactions from "./Transactions";
|
||||||
import CreateTransactions from "./CreateTransactions";
|
import CreateTransactions from "./CreateTransactions";
|
||||||
|
import Laoder from "../../../components/Laoder";
|
||||||
|
|
||||||
export default function FarmPage() {
|
export default function FarmPage() {
|
||||||
const { farmId } = useParams();
|
const { farmId } = useParams();
|
||||||
@@ -37,11 +38,7 @@ export default function FarmPage() {
|
|||||||
}, [farmId]);
|
}, [farmId]);
|
||||||
|
|
||||||
if (loading) {
|
if (loading) {
|
||||||
return (
|
return <Laoder></Laoder>;
|
||||||
<div className="w-full bg-white rounded-lg shadow p-4">
|
|
||||||
<p>Loading farm data...</p>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!farmData) {
|
if (!farmData) {
|
||||||
|
|||||||
Reference in New Issue
Block a user