Skip to content

Commit

Permalink
Clean code in CardList component
Browse files Browse the repository at this point in the history
  • Loading branch information
frank mcmanus committed Nov 23, 2019
1 parent 11ef5cd commit ecac708
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/components/Card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ width:100%;
flex-direction: row;
}
`;

export const AvatarContainer = styled.div`
display:flex;
flex-direction: column;
Expand Down Expand Up @@ -52,7 +53,6 @@ export default function Card(props) {
<AvatarContainer>
<Avatar img={imageUrl}></Avatar>
</AvatarContainer>

<Info>
<div className="title">
<p>{title}</p>
Expand Down
8 changes: 1 addition & 7 deletions src/components/CardList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,7 @@ margin: 0;
padding: 0;
`;

const makeList = (list) => {
return list.map((item) => {
return <li>
<Card item={item}/>
</li>
})
}
const makeList = list => list.map(item => <li><Card item={item}/></li>);

export default function CardList(props) {
let list = props[Object.keys(props)[0]];
Expand Down
1 change: 0 additions & 1 deletion src/components/CodeConduct.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import React from "react";
import CardList from './CardList';
import organizers from '../data/organizers.js';


var iframeStyle = {
height: '500px',
width: '100%'
Expand Down

0 comments on commit ecac708

Please sign in to comment.