mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-24 13:52:45 +00:00
Set territory pattern on purchase (#1932)
## Description: When purchasing a territory pattern, set it after successful purchase ## Please complete the following: - [x] I have added screenshots for all UI updates - [x] I process any text displayed to the user through translateText() and I've added it to the en.json file - [x] I have added relevant tests to the test directory - [x] I confirm I have thoroughly tested these changes and take full responsibility for any bugs introduced ## Please put your Discord username so you can be contacted if a bug or regression is found: evan
This commit is contained in:
@@ -16,7 +16,7 @@ export class PatternButton extends LitElement {
|
||||
onSelect?: (pattern: Pattern | null) => void;
|
||||
|
||||
@property({ type: Function })
|
||||
onPurchase?: (priceId: string) => void;
|
||||
onPurchase?: (pattern: Pattern) => void;
|
||||
|
||||
createRenderRoot() {
|
||||
return this;
|
||||
@@ -40,7 +40,7 @@ export class PatternButton extends LitElement {
|
||||
private handlePurchase(e: Event) {
|
||||
e.stopPropagation();
|
||||
if (this.pattern?.product) {
|
||||
this.onPurchase?.(this.pattern.product.priceId);
|
||||
this.onPurchase?.(this.pattern);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user