Skip to content

Commit

Permalink
ITweetData interface 추출
Browse files Browse the repository at this point in the history
- 이렇게 하는 것이 읽기 더 좋을 것이라는 피드백이 있었습니다.
- thanks to @sunkibaek
  • Loading branch information
johnwook committed Jan 18, 2018
1 parent 18f6bd5 commit 15347f2
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@ import { Component } from "react";
import DefaultHead from "../common/DefaultHead";
import Tweet from "../common/Tweet";

interface ITweetData {
author: string;
content: string;
id: string;
retweetedAt?: number;
}

interface IStates {
tweets: Array<{
author: string;
content: string;
id: string;
retweetedAt?: number;
}>;
tweets: ITweetData[];
}

class Index extends Component<undefined, IStates> {
Expand Down

0 comments on commit 15347f2

Please sign in to comment.