Skip to content
This repository has been archived by the owner on Nov 14, 2022. It is now read-only.

Commit

Permalink
Remove unused code from member list element
Browse files Browse the repository at this point in the history
  • Loading branch information
chiptopher committed Aug 18, 2019
1 parent 7a06545 commit 1a30713
Showing 1 changed file with 7 additions and 35 deletions.
42 changes: 7 additions & 35 deletions src/components/MemberListElement.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import * as React from "react";
import {Member} from "../models/Member";
import {Squad} from "../models/Squad";
import {money} from "../util/money";
import {FontAwesomeIcon} from "@fortawesome/react-fontawesome";
import {faAngleDown, faAngleRight} from "@fortawesome/free-solid-svg-icons";

import "./MemberListElement.scss";

Expand All @@ -12,39 +9,14 @@ interface Props {
squad: Squad
}

interface State {
toggled: boolean
}

export class MemberListElement extends React.Component<Props, State> {
constructor(props: Readonly<Props>) {
super(props);
this.state = {
toggled: false
};
this.otherSquadMembers = this.otherSquadMembers.bind(this);
}

render() {
return <div className={"MemberListElement"}>
<div id={this.props.member.name.replace(/\s+/g, "-")}
onClick={() => {
this.setState({
toggled: !this.state.toggled
})
}}>
<div className={"memberHeader"}>
<div>
{this.props.member.name}
</div>
export function MemberListElement(props: Props) {
return <div className={"MemberListElement"}>
<div id={props.member.name.replace(/\s+/g, "-")}>
<div className={"memberHeader"}>
<div>
{props.member.name}
</div>
</div>
</div>
}

otherSquadMembers(): Member[] {
return this.props.squad.squadMembers.filter((member: Member) => {
return member !== this.props.member;
});
}
</div>;
}

0 comments on commit 1a30713

Please sign in to comment.