forked from aws-samples/aws-bookstore-demo-app
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
44 changed files
with
469 additions
and
211 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,36 @@ | ||
{ | ||
"name": "marvin-2.0", | ||
"name": "aws-bookstore-demo-app", | ||
"version": "0.1.0", | ||
"private": true, | ||
"dependencies": { | ||
"@types/jest": "^23.3.10", | ||
"@types/node": "^10.12.12", | ||
"@types/react": "^16.7.12", | ||
"@types/react-bootstrap": "^0.32.15", | ||
"@types/react-dom": "^16.0.11", | ||
"@types/react-router-bootstrap": "^0.24.5", | ||
"@types/react-router-dom": "^4.3.1", | ||
"aws-amplify": "^1.0.10", | ||
"bootstrap": "^3.3.7", | ||
"react": "^16.5.0", | ||
"react-bootstrap": "^0.32.4", | ||
"react-dom": "^16.5.0", | ||
"react-router-bootstrap": "^0.24.4", | ||
"react-router-dom": "^4.3.1", | ||
"react-scripts": "1.1.5" | ||
"react-scripts": "^2.1.0", | ||
"typescript": "^3.2.1" | ||
}, | ||
"scripts": { | ||
"start": "react-scripts start", | ||
"build": "react-scripts build", | ||
"test": "react-scripts test --env=jsdom", | ||
"eject": "react-scripts eject" | ||
}, | ||
"devDependencies": {} | ||
"devDependencies": {}, | ||
"browserslist": [ | ||
">0.2%", | ||
"not dead", | ||
"not ie <= 11", | ||
"not op_mini all" | ||
] | ||
} |
File renamed without changes.
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
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import React from "react"; | ||
import { Route, Switch } from "react-router-dom"; | ||
import Checkout from "./modules/checkout/Checkout"; | ||
import CheckoutConfirm from "./modules/checkout/CheckoutConfirm"; | ||
import Home from "./modules/signup/Home"; | ||
import Login from "./modules/signup/Login"; | ||
import NotFound from "./modules/notFound/NotFound"; | ||
import Signup from "./modules/signup/Signup"; | ||
import CategoryView from "./modules/category/CategoryView"; | ||
import ShoppingCart from "./modules/cart/ShoppingCart"; | ||
import PastPurchases from "./modules/pastPurchases/PastPurchases"; | ||
import BestSellers from "./modules/bestSellers/BestSellers"; | ||
import SearchView from "./modules/search/SearchView"; | ||
import PropsRoute from "./common/PropsRoute"; | ||
|
||
interface RouteProps { | ||
isAuthenticated: boolean; | ||
userHasAuthenticated: (authenticated: boolean) => void; | ||
} | ||
|
||
export const Routes: React.SFC<RouteProps> = (childProps) => | ||
<Switch> | ||
<PropsRoute path="/" exact component={Home} props={childProps} /> | ||
<PropsRoute path="/login" exact component={Login} props={childProps} /> | ||
<PropsRoute path="/signup" exact component={Signup} props={childProps} /> | ||
<Route path="/best" exact component={BestSellers} /> | ||
<Route path="/cart" exact component={ShoppingCart} /> | ||
<Route path="/category/:id" exact component={CategoryView} /> | ||
<Route path="/past" exact component={PastPurchases} /> | ||
<Route path="/checkout" exact component={Checkout} /> | ||
<Route path="/checkout-confirm" exact component={CheckoutConfirm} /> | ||
<Route path="/search/:id" exact component={SearchView} /> | ||
<Route component={NotFound} /> | ||
</Switch>; |
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
3 changes: 2 additions & 1 deletion
3
assets/src/common/AppliedRoute.js → assets/src/common/PropsRoute.tsx
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
import React from "react"; | ||
import { Route } from "react-router-dom"; | ||
import { Route } from "react-router"; | ||
|
||
//@ts-ignore | ||
export default ({ component: C, props: cProps, ...rest }) => | ||
<Route {...rest} render={props => <C {...props} {...cProps} />} />; |
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
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
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
File renamed without changes.
File renamed without changes.
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
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
File renamed without changes.
Oops, something went wrong.