@rpg-engine/long-bow 0.2.35 → 0.2.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/long-bow.cjs.development.js +2 -2
- package/dist/long-bow.cjs.development.js.map +1 -1
- package/dist/long-bow.cjs.production.min.js +1 -1
- package/dist/long-bow.cjs.production.min.js.map +1 -1
- package/dist/long-bow.esm.js +2 -2
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/TradingMenu/TradingItemRow.tsx +3 -3
- package/src/components/TradingMenu/items.mock.ts +0 -4
package/package.json
CHANGED
|
@@ -2,11 +2,11 @@ import { ITradeResponseItem } from '@rpg-engine/shared';
|
|
|
2
2
|
import capitalize from 'lodash/capitalize';
|
|
3
3
|
import React, { useState } from 'react';
|
|
4
4
|
import styled from 'styled-components';
|
|
5
|
+
import { v4 as uuidv4 } from 'uuid';
|
|
5
6
|
import { colors } from '../../constants/uiColors';
|
|
6
7
|
import SelectArrow from '../Arrow/SelectArrow';
|
|
7
8
|
import { Ellipsis } from '../shared/Ellipsis';
|
|
8
9
|
import { SpriteFromAtlas } from '../shared/SpriteFromAtlas';
|
|
9
|
-
|
|
10
10
|
export interface ITradeComponentProps {
|
|
11
11
|
traderItem: ITradeResponseItem;
|
|
12
12
|
updateChartTotals: (traderItem: ITradeResponseItem) => void;
|
|
@@ -28,7 +28,7 @@ export const TradingItemRow: React.FC<ITradeComponentProps> = ({
|
|
|
28
28
|
setItemQuantity(newQuantity);
|
|
29
29
|
updateChartTotals({
|
|
30
30
|
key: traderItem.key,
|
|
31
|
-
itemId: traderItem.itemId,
|
|
31
|
+
itemId: traderItem.itemId ? traderItem.itemId : uuidv4(),
|
|
32
32
|
qty: newQuantity,
|
|
33
33
|
price: traderItem.price,
|
|
34
34
|
texturePath: traderItem.texturePath,
|
|
@@ -42,7 +42,7 @@ export const TradingItemRow: React.FC<ITradeComponentProps> = ({
|
|
|
42
42
|
setItemQuantity(newQuantity);
|
|
43
43
|
updateChartTotals({
|
|
44
44
|
key: traderItem.key,
|
|
45
|
-
itemId: traderItem.itemId,
|
|
45
|
+
itemId: traderItem.itemId ? traderItem.itemId : uuidv4(),
|
|
46
46
|
qty: newQuantity,
|
|
47
47
|
price: traderItem.price,
|
|
48
48
|
texturePath: traderItem.texturePath,
|
|
@@ -2,28 +2,24 @@ import { ITradeResponseItem } from '@rpg-engine/shared';
|
|
|
2
2
|
export const itemMock: ITradeResponseItem[] = [
|
|
3
3
|
{
|
|
4
4
|
texturePath: 'swords/broad-sword.png',
|
|
5
|
-
itemId: 'itemId03',
|
|
6
5
|
name: 'Silver Short Sword Premium',
|
|
7
6
|
price: 100,
|
|
8
7
|
key: 'Short sword',
|
|
9
8
|
},
|
|
10
9
|
{
|
|
11
10
|
texturePath: "swords/corruption-sword.png",
|
|
12
|
-
itemId: 'itemId01',
|
|
13
11
|
name: 'Short sword Best',
|
|
14
12
|
price: 100,
|
|
15
13
|
key: 'Short sword',
|
|
16
14
|
},
|
|
17
15
|
{
|
|
18
16
|
texturePath: 'swords/broad-sword.png',
|
|
19
|
-
itemId: 'itemId02',
|
|
20
17
|
name: 'Short sword Trade',
|
|
21
18
|
price: 100,
|
|
22
19
|
key: 'Short sword',
|
|
23
20
|
},
|
|
24
21
|
{
|
|
25
22
|
texturePath: 'swords/broad-sword.png',
|
|
26
|
-
itemId: 'itemId03',
|
|
27
23
|
name: 'Short sword',
|
|
28
24
|
price: 100,
|
|
29
25
|
key: 'Short sword',
|