File tree Expand file tree Collapse file tree 3 files changed +25
-3
lines changed
examples/ecommerce-jewellery-store/src Expand file tree Collapse file tree 3 files changed +25
-3
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,10 @@ export const ShoppingCartList: React.FC = () => {
3535 navigate ( "/products" ) ;
3636 } ;
3737
38+ const onProceedClick = ( ) => {
39+ navigate ( "/paymentdetails" )
40+ }
41+
3842 const updateQuantity = ( event ) => {
3943 const target = event . target . element ;
4044 const id = target . getAttribute ( "id" ) ;
@@ -174,7 +178,7 @@ export const ShoppingCartList: React.FC = () => {
174178 </ FieldWrapper >
175179 </ fieldset >
176180 < div className = "k-form-buttons" >
177- < Button themeColor = { "primary" } size = { "large" } >
181+ < Button themeColor = { "primary" } size = { "large" } onClick = { onProceedClick } >
178182 Proceed to Checkout
179183 </ Button >
180184 </ div >
@@ -196,6 +200,11 @@ export const ShoppingCartList: React.FC = () => {
196200 </ section >
197201 </ Layout >
198202 ) : null }
203+ < Layout >
204+ < div className = "k-d-grid" >
205+
206+ </ div >
207+ </ Layout >
199208 </ >
200209 ) ;
201210} ;
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import ExpiryDate from "@/components/ExpiryDate";
55import PasswordInput from "@/components/PasswordInput" ;
66import CardHolder from "@/components/CardHolder" ;
77import { Button } from "@progress/kendo-react-buttons" ;
8+ import { useNavigate } from 'react-router-dom' ;
89
910import {
1011 Form ,
@@ -23,6 +24,12 @@ import {
2324import creditCards from '../assets/creditCards.png' ;
2425
2526const PaymentDetails : React . FC = ( ) => {
27+ const navigate = useNavigate ( ) ;
28+
29+ const onSubmitClick = ( ) => {
30+ navigate ( "/thankyou" )
31+ }
32+
2633 return (
2734 < Layout >
2835 < div className = "k-d-flex k-flex-col k-align-items-center k-py-12 k-px-4 k-gap-10" >
@@ -68,7 +75,7 @@ const PaymentDetails: React.FC = () => {
6875 </ FormElement >
6976 ) }
7077 />
71- < Button className = "k-mt-6" > Submit Order</ Button >
78+ < Button className = "k-mt-6" onClick = { onSubmitClick } > Submit Order</ Button >
7279 </ div >
7380 < div className = "k-col-span-5 k-col-start-8 k-d-flex k-flex-col k-align-items-start" >
7481 < h2 className = "k-mb-4" > Sub total</ h2 >
Original file line number Diff line number Diff line change @@ -3,16 +3,22 @@ import { Layout } from "@/components/Layout";
33import { BackgroundImage } from '../components/BackgroundImage' ;
44import present from "@/assets/present.png" ;
55import { Button } from "@progress/kendo-react-buttons" ;
6+ import { useNavigate } from 'react-router-dom' ;
67
78const ThankYou : React . FC = ( ) => {
9+ const navigate = useNavigate ( ) ;
10+
11+ const onBacktoShoppingClick = ( ) => {
12+ navigate ( "/products" ) ;
13+ }
814 return (
915 < >
1016 < BackgroundImage img = { present } title = "" subtitle = "" />
1117 < Layout >
1218 < div className = "k-d-flex k-flex-col k-justify-content-center k-align-items-center k-h-100 k-text-center" >
1319 < h1 > Thank You For Your Order!</ h1 >
1420 < p > You have submitted your order</ p >
15- < Button className = "k-mt-6" > Back to Shopping</ Button >
21+ < Button className = "k-mt-6" onClick = { onBacktoShoppingClick } > Back to Shopping</ Button >
1622 </ div >
1723 </ Layout >
1824 </ >
You can’t perform that action at this time.
0 commit comments