Преглед на файлове

Redirect home path (/) to recipes

Tatiana Inama преди 6 години
родител
ревизия
e97a73f308
променени са 1 файла, в които са добавени 6 реда и са изтрити 0 реда
  1. 6 0
      recipes/src/route.config.tsx

+ 6 - 0
recipes/src/route.config.tsx

@@ -6,12 +6,18 @@ import ViewRecipe from 'containers/Recipes/View';
 import EditRecipe from 'containers/Recipes/Edit';
 import ShoppingList from 'containers/ShoppingCart/List';
 import PlannerContainer from 'containers/Planner';
+import { Redirect } from 'react-router-dom';
 
 const emptyRoute = (title: string) => (props: any) => {
   return (<h1>{title} {props.match.params && props.match.params.id}</h1>);
 };
 
 const routes = [
+  {
+    path: '/',
+    exact: true,
+    component: () => (<Redirect to='/recipes'/>)
+  },
   {
     path: '/recipes',
     component: RecipesContainer,