Created
December 12, 2019 15:54
-
-
Save raidenz/75abef0296b4596f9ddbfe83503ad98d to your computer and use it in GitHub Desktop.
HomepageLayout with typescript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as React from "react"; | |
import { Route, RouteProps } from "react-router"; | |
interface Props { | |
component: React.ComponentType<RouteProps>; | |
} | |
export const HomepageLayout = ({ component: Component, ...rest }: Props) => { | |
return ( | |
<Route {...rest} render={routeProps => <Component {...routeProps} />} /> | |
); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment