Passing Interface props in functional component in Typescript
Solution 1:
You are creating a functional component and tell TypeScript, that you want to pass mandatory props data to this component. If you don't need to pass any props to your component, you can mark them as "optional" by adding a question mark.
By reading your code for the router, I see you don't have passed in that mandatory props data and thus, TypeScript will throw an error.