mirror of
https://github.com/exzork/gc-tools.git
synced 2024-11-21 14:48:33 +00:00
support new camelCase naming
This commit is contained in:
parent
a5bfdcc266
commit
13da38c55a
@ -80,12 +80,12 @@ export default function Artifacts() {
|
||||
|
||||
const handleMainStatChange = (event: any, value: any) => {
|
||||
if (value !== null) {
|
||||
setSelectedMainStat(value.Id);
|
||||
setSelectedMainStat(value.id);
|
||||
}
|
||||
};
|
||||
|
||||
const getAffixIdByPropTypeAndPropValue = (propType: string, propValue: number) => {
|
||||
return reliquaryAffixes.filter((x) => x.PropType === propType && x.PropValue === propValue)[0].Id;
|
||||
return reliquaryAffixes.filter((x) => x.propType === propType && x.propValue === propValue)[0].id;
|
||||
};
|
||||
|
||||
const getListOfIdsByPropTypeAndRequestValue = (affixName: string, requestValue: number) => {
|
||||
@ -146,10 +146,10 @@ export default function Artifacts() {
|
||||
const getPropTypeValues = (affixes: IReliquaryAffix[]) => {
|
||||
let propTypeValues: IPropTypeValues = {};
|
||||
affixes.forEach(affix => {
|
||||
if (propTypeValues[affix.PropType] === undefined) {
|
||||
propTypeValues[affix.PropType] = [];
|
||||
if (propTypeValues[affix.propType] === undefined) {
|
||||
propTypeValues[affix.propType] = [];
|
||||
}
|
||||
if (affix.PropValue > 0) propTypeValues[affix.PropType].push(affix.PropValue);
|
||||
if (affix.propValue > 0) propTypeValues[affix.propType].push(affix.propValue);
|
||||
});
|
||||
return propTypeValues;
|
||||
};
|
||||
@ -237,7 +237,7 @@ export default function Artifacts() {
|
||||
aria-label="Artifact Main Stats" id="ArtifactMainStats"
|
||||
className="block w-full shadow-sm focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm border-gray-300 rounded-md"
|
||||
options={reliquaryMains}
|
||||
getOptionLabel={(option) => t(option.PropType)}
|
||||
getOptionLabel={(option) => t(option.propType)}
|
||||
onChange={handleMainStatChange}
|
||||
renderInput={(params) => <TextField {...params} label="Main Stats"
|
||||
variant="outlined"/>}
|
||||
|
@ -1,15 +1,15 @@
|
||||
export interface IReliquaryMain {
|
||||
Id: number;
|
||||
PropDepotId: number;
|
||||
PropType:string;
|
||||
AffixName:string;
|
||||
id: number;
|
||||
propDepotId: number;
|
||||
propType:string;
|
||||
affixName:string;
|
||||
}
|
||||
export interface IReliquaryAffix {
|
||||
Id: number;
|
||||
DepotId: number;
|
||||
GroupId: number;
|
||||
PropType:string;
|
||||
PropValue:number;
|
||||
id: number;
|
||||
depotId: number;
|
||||
groupId: number;
|
||||
propType:string;
|
||||
propValue:number;
|
||||
}
|
||||
export default class ReliquaryDataProvider {
|
||||
private static reliquaryMains:IReliquaryMain[] = [];
|
||||
@ -25,7 +25,7 @@ export default class ReliquaryDataProvider {
|
||||
let json:IReliquaryMain[] = await data.json();
|
||||
this.reliquaryMains = [];
|
||||
json.forEach(element => {
|
||||
if (this.reliquaryMains.filter(x => x.PropType === element.PropType).length === 0)
|
||||
if (this.reliquaryMains.filter(x => x.propType === element.propType).length === 0)
|
||||
this.reliquaryMains.push(element)
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user