What's wrong in my code react
export const BeritaView = ({ match }) => {
const article = articles.find(item => item.id === match.params.id);
console.log(articles, match.params.id);
return(
<div>
<h3> News ID: {match.params.id} </h3>
<h4> {article.title} </h4>
<p> {article.content} </p>
<Link to={`/berita`}> Back to Berita dan Kegiatan </Link>
</div>
)
}
error calls this :
'import' and 'export' may only appear at the top level
Can anyone help me?