'Parsing error: Identifier 'React' has already been declared. (9:7)

I am using React 17, That,s I did not use import React from "react" in both but this error is coming again and again

app.js

`import Restaurant from './component/Basics/restaurant'

const App = () => {
   return (
     <div>
    <Restaurant />
     </div>
        )
 }

 export default App;

2nd page

const Restaurant = () => {
 return (
   <div>Hello from restaurant</div>
     )
 }
 export default Restaurant


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source