diff --git a/web/src/data/datasource/api/place_datasource.ts b/web/src/data/datasource/api/place_datasource.ts index 946b8bb567e3d5c8389002de8bbb9e635a7dfa70..ad78f7e238228335e37731f8884382ee469ee925 100644 --- a/web/src/data/datasource/api/place_datasource.ts +++ b/web/src/data/datasource/api/place_datasource.ts @@ -132,6 +132,6 @@ export class PlaceDatasourceProd implements PlaceDatasourceInf { * @returns A promise that resolves when the place is deleted. */ async deletePlace(idPlace: number): Promise { - //await axios.patch(APIUrl + `/place/${idPlace}`) + await axios.delete(APIUrl + `/place/${idPlace}`) } } diff --git a/web/src/presentation/admin/admin_panel_places/admin_panel_place_list/admin_panel_place_list.tsx b/web/src/presentation/admin/admin_panel_places/admin_panel_place_list/admin_panel_place_list.tsx index 468d08095e04a445043610cbdf4b47426c243cc8..8cbd47e7d8699af08bd18a27f424bfdcc2ac3ba1 100644 --- a/web/src/presentation/admin/admin_panel_places/admin_panel_place_list/admin_panel_place_list.tsx +++ b/web/src/presentation/admin/admin_panel_places/admin_panel_place_list/admin_panel_place_list.tsx @@ -18,6 +18,7 @@ interface props { setIsWindowActiveDelete: Dispatch>; setActualPlace: Dispatch>; setIsRegisterPane: Dispatch>; + forceRenderList: () => void; } // Define the AdminPanelPlaceList component @@ -28,9 +29,11 @@ export const AdminPanelPlaceList = ({ setActualPlace, setIsRegisterPane, setIsWindowActiveDelete, + forceRenderList, }: props) => { // Use the custom hook to fetch place data - const { placeList, pending, updatePlacesByTown, deletePlace } = usePlace(); + const { placeList, pending, updatePlacesByTown, deletePlace } = + usePlace(forceRenderList); // State variables for managing dialog and deletion const [isDialogOpen, setIsDialogOpen] = useState(false); @@ -113,7 +116,8 @@ export const AdminPanelPlaceList = ({ } }} /> - {/* Separation between icons */} + {" "} + {/* Separation between icons */}