From 89e9593eafd264ee1d6801579abb08381443e356 Mon Sep 17 00:00:00 2001 From: jason Date: Sun, 8 Mar 2026 23:03:42 -0500 Subject: [PATCH] Integrate DogForm into DogList for add functionality --- client/src/pages/DogList.jsx | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/client/src/pages/DogList.jsx b/client/src/pages/DogList.jsx index 5f09f22..9f0c7bf 100644 --- a/client/src/pages/DogList.jsx +++ b/client/src/pages/DogList.jsx @@ -2,6 +2,7 @@ import { useEffect, useState } from 'react' import { Link } from 'react-router-dom' import { Dog, Plus, Search } from 'lucide-react' import axios from 'axios' +import DogForm from '../components/DogForm' function DogList() { const [dogs, setDogs] = useState([]) @@ -47,6 +48,10 @@ function DogList() { setFilteredDogs(filtered) } + const handleSave = () => { + fetchDogs() + } + if (loading) { return
Loading dogs...
} @@ -111,6 +116,13 @@ function DogList() {

No dogs found matching your search criteria.

)} + + {showAddModal && ( + setShowAddModal(false)} + onSave={handleSave} + /> + )} ) }