If you come across this error in your React project:
export 'Redirect' (imported as 'Redirect') was not found in 'react-router-dom'
Your project has react-router-dom version 6. In version 6, you will need to replace component prop with element prop within your route.
or you can revert to react-router-dom version 5.
Hopefully this was helpful.