Fix use-before-defined import issue

This commit is contained in:
Snarling
2022-09-13 13:15:36 -04:00
parent 91a69d7d8f
commit 1ac57d2e48
5 changed files with 33 additions and 29 deletions
+9 -9
View File
@@ -44,39 +44,39 @@ export function GenericLocation({ loc }: IProps): React.ReactElement {
const content: React.ReactNode[] = [];
if (loc.types.includes(LocationType.Company)) {
content.push(<CompanyLocation key={"companylocation"} locName={loc.name} />);
content.push(<CompanyLocation locName={loc.name} />);
}
if (loc.types.includes(LocationType.Gym)) {
content.push(<GymLocation key={"gymlocation"} loc={loc} />);
content.push(<GymLocation loc={loc} />);
}
if (loc.types.includes(LocationType.Hospital)) {
content.push(<HospitalLocation key={"hospitallocation"} />);
content.push(<HospitalLocation />);
}
if (loc.types.includes(LocationType.Slums)) {
content.push(<SlumsLocation key={"slumslocation"} />);
content.push(<SlumsLocation />);
}
if (loc.types.includes(LocationType.Special)) {
content.push(<SpecialLocation key={"speciallocation"} loc={loc} />);
content.push(<SpecialLocation loc={loc} />);
}
if (loc.types.includes(LocationType.TechVendor)) {
content.push(<TechVendorLocation key={"techvendorlocation"} loc={loc} />);
content.push(<TechVendorLocation loc={loc} />);
}
if (loc.types.includes(LocationType.TravelAgency)) {
content.push(<TravelAgencyRoot key={"travelagencylocation"} />);
content.push(<TravelAgencyRoot />);
}
if (loc.types.includes(LocationType.University)) {
content.push(<UniversityLocation key={"universitylocation"} loc={loc} />);
content.push(<UniversityLocation loc={loc} />);
}
if (loc.types.includes(LocationType.Casino)) {
content.push(<CasinoLocation key={"casinoLocation"} />);
content.push(<CasinoLocation />);
}
return content;
+1 -3
View File
@@ -17,6 +17,7 @@ type IState = {
currHp: number;
};
//Todo: Make this a functional component
export class HospitalLocation extends React.Component<Record<string, never>, IState> {
/**
* Stores button styling that sets them all to block display
@@ -26,9 +27,6 @@ export class HospitalLocation extends React.Component<Record<string, never>, ISt
constructor() {
super({});
this.getCost = this.getCost.bind(this);
this.getHealed = this.getHealed.bind(this);
this.state = {
currHp: Player.hp.current,
};