Fix:Fixed Fetch
This commit is contained in:
@@ -7,11 +7,8 @@ const Transactions = ({ farmId }) => {
|
|||||||
const [loading, setLoading] = useState(true);
|
const [loading, setLoading] = useState(true);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
fetch(`http://localhost:8000/api/v1/finance`, {
|
fetch(`http://localhost:8000/api/v1/finance/${farmId}`, {
|
||||||
credentials: "include",
|
credentials: "include",
|
||||||
|
|
||||||
headers: { "Content-Type": "application/json" },
|
|
||||||
body: JSON.stringify({ farm: farmId }),
|
|
||||||
})
|
})
|
||||||
.then((response) => response.json())
|
.then((response) => response.json())
|
||||||
.then((data) => {
|
.then((data) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user