From 2d6ba7459fff67823b55cfc39342896873962714 Mon Sep 17 00:00:00 2001
From: eug-vs <eug-vs@keemail.me>
Date: Fri, 7 Aug 2020 22:25:20 +0300
Subject: refactor: simplify Route component

---
 src/pages/Route.tsx | 11 +++++++++++
 1 file changed, 11 insertions(+)
 create mode 100644 src/pages/Route.tsx

(limited to 'src/pages/Route.tsx')

diff --git a/src/pages/Route.tsx b/src/pages/Route.tsx
new file mode 100644
index 0000000..fdd6f96
--- /dev/null
+++ b/src/pages/Route.tsx
@@ -0,0 +1,11 @@
+import React from 'react';
+import { Route as BaseRoute } from 'react-router-dom';
+
+
+const Route: React.FC<any> = ({ component: Component,  ...rest }) => {
+  const render: React.FC<any> = (props) => <Component {...props} />;
+
+  return <BaseRoute render={render} {...rest} />;
+};
+
+export default Route;
-- 
cgit v1.2.3

