zasilkovna

This commit is contained in:
Martin Quarda 2024-10-14 14:18:07 +02:00
parent 88b3f25afe
commit 7109013592
2 changed files with 8 additions and 1 deletions

View File

@ -6,6 +6,7 @@
<title>Alkátor Race</title>
<meta name="description" content="Jedná se o překážkový závod u nás v Orlických horách s pivem a panáky." />
<meta name="author" content="Martin Quarda" />
<script src="https://widget.packeta.com/v6/www/js/library.js"></script>
</head>
<body>
<div id="root"></div>

View File

@ -194,6 +194,12 @@ class Main extends Component {
racer: {...prevState.racer, [target.name]: target.value,}
}));
};
selectDeliveryCallback(point){
console.log(point)
}
selectDelivery = () => {
Packeta.Widget.pick("8599115769fd895b", this.selectDeliveryCallback.bind(this))
}
togglefaq(){
this.setState({faq: !this.state.faq});
}
@ -336,7 +342,7 @@ class Main extends Component {
</tr>)}
<tr>
<td>Celkem</td>
<td></td>
<td><button class="btn btn-primary" type="submit" onClick={(e) => this.selectDelivery()}>Vybrat Zásilkovnu</button></td>
<td>{this.calculateTotalPrice()} </td>
<td><form id="form" action='/api/cart/buy' onSubmit={(e) => this.onSubmit(e)}><button class="btn btn-primary" type="submit"><input type="hidden" name="something" value="nothing" />Koupit</button></form></td>
</tr>