Component.tsx 889 Bytes
import * as React from "react";
import { Link } from "react-router-dom";
import styled from "styled-components";
import TextField from "material-ui/TextField";
import RaisedButton from "material-ui/RaisedButton";

require("./styles.scss");

const style = {
  width: "100%"
};

interface Props {
  orgs: Array<any>;
}

class OrgPage extends React.Component<Props> {
  public render() {
    const { props } = this;
    const { orgs } = props;
    console.log(orgs, orgs.length);
    return (
      <div className="org-page">
        <h2>신청서 심사</h2>
        <ul>
          {orgs.map(org => (
            <li key={org.id}>
            <h3>{org.name}</h3>
              <p><Link to={`/judge/${org.id}`}>심사</Link></p>
              <p><Link to={`/search/${org.id}`}>질의</Link></p>
            </li>
          ))}
        </ul>
      </div>
    );
  }
}

export default OrgPage;