import { useEffect, useState } from 'react' import { useParams } from 'react-router-dom' const EditNotificationTarget = () => { const { id } = useParams() const [notificationTarget, setNotificationTarget] = useState(null) const [loading, setLoading] = useState(true) const [error, setError] = useState(null) useEffect(() => { // const fetchNotificationTarget = async () => { // try { // const response = await fetch(`/api/notification-targets/${id}`) // const data = await response.json() // setNotificationTarget(data) // } catch (error) { // setError(error) // } finally { // setLoading(false) // } // } // fetchNotificationTarget() }, [id]) if (loading) { return
Loading...
} if (error) { return
Error: {error.message}
} return (

Edit Notification Target

) } export default EditNotificationTarget