import { Edit, SimpleForm, TextInput } from 'react-admin';import { useParams } from 'react-router-dom';export const SongDetail = () = { const { id, songId } = useParams(); return ( Edit resource="posts" id={songId} redirect={`/artists/${id}
import { Edit, SimpleForm, TextInput } from 'react-admin';
import { useParams } from 'react-router-dom';
export const SongDetail = () => {
const { id, songId } = useParams();
return (
<Edit resource="posts" id={songId} redirect={`/artists/${id}/songs`}>
<SimpleForm>
<TextInput source="title" />
<DateInput source="released" />
<TextInput source="writer" />
<TextInput source="producer" />
<TextInput source="recordCompany" label="Label" />
</SimpleForm>
</Edit>
);
};